query output to a label help!

jeremypaule

Registered User.
Local time
Today, 17:30
Joined
Aug 21, 2006
Messages
135
Hello, I’m pretty bad with VB code but I need something pretty simple. I have a button on my form and when I click it I want it to run a query and output a certain field value to a label. I know I’ll need VB code for this, so any sample code would help a ton!
 
anyone? let me know if i need to make the question clearer. I've searched through the forms and couldn't find what I need.
 
I am not sure what versions of access support DLookup but this is likely what you need.



txtBoxName.Value = DLookup("CustomerName", "tblCustomers","Customer_ID =" & Variable

Look up the syntax because I may be a bit off.
 
you can update a label but the syntax is

labelname.CAPTION =
 

Users who are viewing this thread

Back
Top Bottom