Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple query question

Status
Not open for further replies.

ViperD

IS-IT--Management
May 1, 2003
27
US
In VB if I want to get a value from a table I just do a regular SLQ statement correct?

So the syntax would be???

SELECT PaymentType From CustomerTable where CustomerID = 1234

How would this look in Access VB, and how would I access this value? What I want to do is have a field automatically populated when filling out a form. When a specific field loses focus, I want to query the customer table to find the payment type, and then use an if statement to calculate the value to populate into a different field.
 
DoCmd.RunSQL "SELECT PaymentType From CustomerTable where CustomerID=" & "1234"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top