A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

parameter to populate 2nd combo



 
 
Thread Tools Display Modes
  #1  
Old November 5th, 2009, 03:51 PM posted to microsoft.public.access.forms
Terri
external usenet poster
 
Posts: 291
Default parameter to populate 2nd combo

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




--
terri
  #2  
Old November 6th, 2009, 02:48 PM posted to microsoft.public.access.forms
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default parameter to populate 2nd combo

Terri -

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

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


"terri" wrote:

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




--
terri

  #3  
Old November 6th, 2009, 05:24 PM posted to microsoft.public.access.forms
Terri
external usenet poster
 
Posts: 291
Default parameter to populate 2nd combo

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" wrote:

Terri -

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

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


"terri" wrote:

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




--
terri

  #4  
Old November 11th, 2009, 07:05 PM posted to microsoft.public.access.forms
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default parameter to populate 2nd combo

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" wrote:

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" wrote:

Terri -

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

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


"terri" wrote:

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




--
terri

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:24 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.