I have a data entry form that logs phone calls. I also have a zip code table with all the zip codes in the US. from the phone number textbox I can get the area code using:
Private Sub callingnumber_LostFocus()
Dim acode As Variant
acode = Mid(callingnumber, 1, 3)
Me.callorigin = acode
That puts the area code into a textbox. I want use the data in that textbox in a query to get additional; info into 2 other text boxes; Region and Description.
the query(luZipcode) in SQL is:
SELECT areacodetbl.Region, areacodetbl.Description
FROM areacodetbl
WHERE (((areacodetbl.Region)="210"));
DoCmd.OpenQuery "luZipcode", , acReadOnly
how do I get the results of that query into text boxes?(Region and Description)?
Thanks
Private Sub callingnumber_LostFocus()
Dim acode As Variant
acode = Mid(callingnumber, 1, 3)
Me.callorigin = acode
That puts the area code into a textbox. I want use the data in that textbox in a query to get additional; info into 2 other text boxes; Region and Description.
the query(luZipcode) in SQL is:
SELECT areacodetbl.Region, areacodetbl.Description
FROM areacodetbl
WHERE (((areacodetbl.Region)="210"));
DoCmd.OpenQuery "luZipcode", , acReadOnly
how do I get the results of that query into text boxes?(Region and Description)?
Thanks