parameter to populate 2nd combo

T

terri

help please :(

i have a form (clerkdataentry) with a combo box (cboCDSinitials) that asks
for an autior's initials.(cdsinitials)...works great but....
i want the second combo box to look up those chosen initials in another
table (CoderCDS) and give me the SLogin for those initials and store it in
the table the form uses.

Row Source for the 2nd combo box:
PARAMETERS Forms![ClerkDataEntry]!cboCDSinitials; SELECT SLogin FROM
CoderCDS WHERE (Forms![ClerkDataEntry]!cboCDSinitials = [Initials])

what's wrong with this?? It's just blank :(
 
D

Daryl S

Terri -

Remove this part:
PARAMETERS Forms![ClerkDataEntry]!cboCDSinitials;

You have the conditions in the RecordSource query.
 
T

terri

great!! you're so smart!!
but...
sorry there's a 'but'....
i have to drop down that combo box to see the SLogin and choose it because
it's blank. the only choices are of course the blank and the correct SLogin.
is there a way to get rid of the blank?
--
terri


Daryl S said:
Terri -

Remove this part:
PARAMETERS Forms![ClerkDataEntry]!cboCDSinitials;

You have the conditions in the RecordSource query.
--
Daryl S


terri said:
help please :(

i have a form (clerkdataentry) with a combo box (cboCDSinitials) that asks
for an autior's initials.(cdsinitials)...works great but....
i want the second combo box to look up those chosen initials in another
table (CoderCDS) and give me the SLogin for those initials and store it in
the table the form uses.

Row Source for the 2nd combo box:
PARAMETERS Forms![ClerkDataEntry]!cboCDSinitials; SELECT SLogin FROM
CoderCDS WHERE (Forms![ClerkDataEntry]!cboCDSinitials = [Initials])

what's wrong with this?? It's just blank :(
 
D

Daryl S

Terri -

The blank that shows up is the current value of the field.

From what I read now, it sounds like there is exactly one SLogin for any
cdsinitials. If you want that value in the second field, you don't need a
second combo box to do that. You can change the recordsource of the first
combo box or list box to get both the cdsinitials and SLogin. Then when the
user select the cdsinitials, you can put the SLogin into the other field you
want saved. The code would be in the BeforeUpdate event of the combo box and
would look something like this:

Me.SLoginField.Value = Me.CDSInitialsComboBox.Column(1)

Where Column(1) is really the second column containing the SLogin.

Hope that helps.

--
Daryl S


terri said:
great!! you're so smart!!
but...
sorry there's a 'but'....
i have to drop down that combo box to see the SLogin and choose it because
it's blank. the only choices are of course the blank and the correct SLogin.
is there a way to get rid of the blank?
--
terri


Daryl S said:
Terri -

Remove this part:
PARAMETERS Forms![ClerkDataEntry]!cboCDSinitials;

You have the conditions in the RecordSource query.
--
Daryl S


terri said:
help please :(

i have a form (clerkdataentry) with a combo box (cboCDSinitials) that asks
for an autior's initials.(cdsinitials)...works great but....
i want the second combo box to look up those chosen initials in another
table (CoderCDS) and give me the SLogin for those initials and store it in
the table the form uses.

Row Source for the 2nd combo box:
PARAMETERS Forms![ClerkDataEntry]!cboCDSinitials; SELECT SLogin FROM
CoderCDS WHERE (Forms![ClerkDataEntry]!cboCDSinitials = [Initials])

what's wrong with this?? It's just blank :(
 

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