Selecting a record from a combobox

M

Melissa

Hi there

I have a form for "Advertisers" which is a form that includes contact info
for my advertisers.

i have created a seperate form, and on this form, i want to insert a combo
box where i can select
an advertiser from, and then when i select the advertiser in the combo box,
i want my "advertisers" form to open, showing that specific advertiser i
selected

please help

thank u
Melissa
 
T

tkelley via AccessMonster.com

Build a query to be the RecordSource for the advertiser detail form. In the
query, for the criteria of the AdvertiserName field:

=Forms![FormWithComboBox]![ComboBox].value

Try that ...
 
L

Linq Adams via AccessMonster.com

This is one of those thiings with a bunch of workable approaches.

In the calling form, where

AdvertiserSelectCombo

is the name of the combobox:

Private Sub Private Sub AdvertiserSelectCombo_AfterUpdate()
DoCmd.OpenForm "AdvertiserDataForm", , , , , , Me.AdvertiserSelectCombo
End Sub


In the form where the advertiser data resides, where

Advertiser

is the textbox that holds the advertiser's name:
Private Sub Form_Load()
If Len(Nz(Me.OpenArgs, "")) > 0 Then
Advertiser.SetFocus
DoCmd.FindRecord Me.OpenArgs
End If
End Sub

Just plug in your own actual names.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top