combo box

jarheadjim

Registered User.
Local time
Today, 03:12
Joined
Mar 6, 2002
Messages
83
i have a combo box that on "after update" should fill in two other text boxes from a table, but I don't know how to seperate the two pieces of code. do i need a ; or : in there?


Private Sub Location_AfterUpdate()
[Material] = [location].Column(1)
[NSN] = [location].Column(2)
End Sub
 
Funny, we just discussed this yesterday. Which way you go about it depends on whether you need to store the value (use AfterUpdate) or just view it on the form (since you're referring to it from somewhere else, you probably don't need to store it).

You're combining the two methods which is why it isn't working for you, most likely. One needs the Me. prefix to the field, the other doesn't (don't ask me why, it's Microsloth).
http://www.access-programmers.co.uk/ubb/Forum2/HTML/001607.html

[This message has been edited by David R (edited 05-02-2002).]
 
I actually do need to store it. I am the Hazardous Materials Coordinator for my squadron (I'm in the U.S. Marine Corps), and all of the information is required by the department of defense to be on my check out logs.
 
Jack's solution will work then. It's very similar to what you're using now except for the Me. part, and make sure the column count is still correct.

[This message has been edited by David R (edited 05-02-2002).]
 

Users who are viewing this thread

Back
Top Bottom