Value of one text box to populate other text boxes

elfranzen

Registered User.
Local time
Today, 04:39
Joined
Jul 26, 2007
Messages
93
I would like to type a value in one text box and fill in four other text boxes with informaiton. I have one table that will be imported on a weekly bases to update the locatoin of machines. I would like to be able to creat a heat ticket for a tech from a call center. I would like for the dispatcher to type in the serial number of the machine and populate the location and what type of machine it is. This informaton will then be logged into a heat ticket database. I would like to do this In VBA but anything will work. I know I have done something like this before but can remember what I did.
 
two possibilities:
program your lostfocus event for the textbox in which you enter the serial number or create a button on which you have to click in order to see the information.
In both cases you need to program a function which populates the remaining textboxes.
Pseudocode:
Code:
sub txtbox_lostfocus()
   RetrieveInfo me.txtbox
end sub
or
Code:
sub cmdGetInfo ()
   RetrieveInfo me.txtbox
end sub
Code:
sub  RetrieveInfo(strSerial as string)
   me.txt1 = dlookup("","","")
   me.txt2 = dlookup("","","")
   me.txt3 = dlookup("","","")
end sub
HTH
 
Thanks

I have been playing around and started to use a list box this seems to work other then I would like for them to be able to type in the number right not I have a list of number

1001
1002
1003
2001

when I type in a 1 then 0,0,2 it would jump to the 2001. How can I get it to pick 1002 instead of 2001. I don't want them to pick it from a list because we are talking about 1000's of machines.
 
sorry don't understand. what is a Combobox I.S.O. or are you telling me to use a list box instead.
 
Sorry, use a combobox instead of a listbox. Then you can type 1002 without it jumping to 2001.
 
OK I have changed it to a combo box but now i get this error
The expre3ss on lost focus you entered as the event prperty setting producred the following error: Ambigous name detects: combo30_lostfocus.
 

Users who are viewing this thread

Back
Top Bottom