If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How to make a Form Field return numeric value
I have a form with a field (Field A) that has a list box with values such as
apple, orange, and bannana. In field B I would like it to display automatically a 1 if apple is selected in Field A, a 2 if orange is selected and so on. How can I do this? Thanks for any help. |
#2
|
|||
|
|||
There are several ways to accomplish this, here is one:
Put code like this in the On Click event of the list box: Select Case cboFieldA Case "Apple" txtFieldB = 1 Case "Orange" txtFieldB = 2 Case "Bannana" txtFieldB = 3 Case Else txtFieldB = "" End Select "Todd" wrote: I have a form with a field (Field A) that has a list box with values such as apple, orange, and bannana. In field B I would like it to display automatically a 1 if apple is selected in Field A, a 2 if orange is selected and so on. How can I do this? Thanks for any help. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need to clear controls of Filter form | Jan Il | Using Forms | 2 | November 28th, 2004 02:04 PM |
Cursor Positioning | Colin Hammond | General Discussion | 3 | November 2nd, 2004 08:42 PM |
auto entry into second table after update | Tony | New Users | 13 | July 9th, 2004 10:42 PM |
synchronizing form and list box | Deb Smith | Using Forms | 8 | June 21st, 2004 08:15 PM |
NUMBERING the pages | Bob | New Users | 7 | June 14th, 2004 12:20 AM |