look-up query help

razoRjaw

Registered User.
Local time
Today, 01:42
Joined
Sep 16, 2009
Messages
17
hi all, this is my first post.

I was wondering if anyone could point me in the right direction to run an "on lost focus" event. I have two combo boxes, one for SuiteNum and one for TenantName.
I want to be able to have access 2007 do a lookup if someone selects "suite 100" the TenantName combo box is automatically populated with the result from the record for suite 100 from the table that contains the list of suites and respective tenants.

Is this a simple thing to do? or am i trying to bite off more than i can chew?

thanks for the advice.
 
Last edited:
hey thanks, reading that MS article did help a little, but its not exactly what i wanted to do.
maybe i should simplify what i mean.

i have two tables, A & B
two combo boxes 1 & 2 which are autopopulated from colums in tblA. The form stores records in tblB.

the comboboxes do populate the values from table A and place them in table B which solved half of my problem.

what i really want to do is on "After Update" to cbo1, making cbo2 auto filled with the respective value from table A.

Private Sub cbo1_AfterUpdate()
Me.cbo2 = Me![cbo1].column(2)
End Sub

i get the concept behind this, but dont get how to make it fetch the data from the other table. change me! to "tblA!"?

I really appreciate the help and advice. this seems like a great site.
 
this is a GREAT site, and there a lot of smart people lurking here.. unfortunately, i am not one of them. but at any rate...there rarely is a need to pop on combo box from another one. why are you doing that? what ya gonna do with the other value in combo B once its there? if you tell me that, maybe i can suggest another way around this so its easier and less of headache to get to the end of the road.
 
thanks for responding.
so here is an overview. we have a large office complex. 175 tenants.
Im making a few databases and i need to be able to have two combo boxes, one for the suite number, one for the tenant name. if someone calls and says "im suite number 358" i want the name of the company in suite 328 to pop up in the combo box for the tenant name.

but i also need to be able to enter the tenant name only and have the suite number automatically in the combo box if the person calls and gives only their company name.

its double work to choose each one, and some ppl dont know all the tenants, only suite numbers and vice versa.

is this possible?
 

Users who are viewing this thread

Back
Top Bottom