Kaup, Chester A
kaupca at chevrontexaco.com
Wed Jun 4 15:36:32 CDT 2003
Worked great and by making first column width to 0 I only see the month name and not the number. Thanks -----Original Message----- From: Jim DeMarco [mailto:Jdemarco at hshhp.org] Sent: Wednesday, June 04, 2003 2:32 PM To: accessd at databaseadvisors.com Subject: RE: [AccessD] Month name in list box to number Chester, Two choices that I see: 1. Use "1;January;2;February"... as your list boxes row source and binding to the first column. Then just refer to lstMonth.value to get the month number. or 2. Or if your list box contains one column with month text, in code: dim sDummy as String sDummy = lstMonth.Value & " 1, 20003" and call Month(sDummy) to get the month number. The day and year values passed in via the string do not have to change ever since you're only interested in the month value. HTH, Jim DeMarco Director of Product Development HealthSource/Hudson Health Plan -----Original Message----- From: Kaup, Chester A [mailto:kaupca at chevrontexaco.com] Sent: Wednesday, June 04, 2003 3:19 PM To: accessd at databaseadvisors.com Subject: [AccessD] Month name in list box to number I have a form with a list box filled with month names. Ex January. I have a table that has data stored by month number. How can a convert the month name to a number to find the appropriate record in the table. I can do it with a select in code but thought there might be an easier way to query the table based on the selection from the form. Thanks No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced. ************************************************************************ *********** "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". ************************************************************************ *********** -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030604/1315a2e0/attachment-0001.html>