Combo box criteria in ADP

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two combo boxes on a form. The first displays FlyingSquadron ( I
display the Squadron Name and store the SquadronId ) the second combo box
displays the Callsign. Each FlyingSquadron has unique Callsigns and I use the
limit to list. I need to be able to base the row source of the Callsign combo
box on the SquadronId from the first combo box. I did this easily using an
MDB but can't get it to work now that I'm using an ADP. Thanks for any help
provided.
 
I would reassign the rowsource of the callsign combobox. I think you can do
it on the EnterEvent of the combo. The where clause should be something
like..

Where [Callsign] = " & [SquadronID]

SO that you are concatinating the Value of the Squadron ID. I don't know if
the Field you are assigning is {Callsign], but whatever it is, this method
should work. If you don't understand it, try posting the SQL of the
Rowsource and I will modify it for you and try to give you better
instruction.

God Bless,

Mark A. Sam
 
Mark, Thanks for the help, this is kicking my ass. This works in the
rowsource but it is hard coded with a UnitId of 1.

SELECT CallSign, UnitId FROM tblCallsigns WHERE (UnitId = 1) ORDER BY CallSign

I need this to work but it errors out :

SELECT CallSign, UnitId FROM tblCallsigns WHERE UnitId = cboUnit.column(3)
ORDER BY CallSign

Thanks again for the help.


Mark A. Sam said:
I would reassign the rowsource of the callsign combobox. I think you can do
it on the EnterEvent of the combo. The where clause should be something
like..

Where [Callsign] = " & [SquadronID]

SO that you are concatinating the Value of the Squadron ID. I don't know if
the Field you are assigning is {Callsign], but whatever it is, this method
should work. If you don't understand it, try posting the SQL of the
Rowsource and I will modify it for you and try to give you better
instruction.

God Bless,

Mark A. Sam


AkAlan said:
I have two combo boxes on a form. The first displays FlyingSquadron ( I
display the Squadron Name and store the SquadronId ) the second combo box
displays the Callsign. Each FlyingSquadron has unique Callsigns and I use the
limit to list. I need to be able to base the row source of the Callsign combo
box on the SquadronId from the first combo box. I did this easily using an
MDB but can't get it to work now that I'm using an ADP. Thanks for any help
provided.
 
Alan,

In the Enter event of the Combo, try this:

Me.ActiveControl.RowSource = "SELECT CallSign, UnitId FROM tblCallsigns
WHERE (UnitId = " & cboUnit.column(3) & ") ORDER BY CallSign;"


AkAlan said:
Mark, Thanks for the help, this is kicking my ass. This works in the
rowsource but it is hard coded with a UnitId of 1.

SELECT CallSign, UnitId FROM tblCallsigns WHERE (UnitId = 1) ORDER BY CallSign

I need this to work but it errors out :

SELECT CallSign, UnitId FROM tblCallsigns WHERE UnitId = cboUnit.column(3)
ORDER BY CallSign

Thanks again for the help.


Mark A. Sam said:
I would reassign the rowsource of the callsign combobox. I think you can do
it on the EnterEvent of the combo. The where clause should be something
like..

Where [Callsign] = " & [SquadronID]

SO that you are concatinating the Value of the Squadron ID. I don't know if
the Field you are assigning is {Callsign], but whatever it is, this method
should work. If you don't understand it, try posting the SQL of the
Rowsource and I will modify it for you and try to give you better
instruction.

God Bless,

Mark A. Sam


AkAlan said:
I have two combo boxes on a form. The first displays FlyingSquadron ( I
display the Squadron Name and store the SquadronId ) the second combo box
displays the Callsign. Each FlyingSquadron has unique Callsigns and I
use
the
limit to list. I need to be able to base the row source of the
Callsign
combo
box on the SquadronId from the first combo box. I did this easily using an
MDB but can't get it to work now that I'm using an ADP. Thanks for any help
provided.
 
Thanks Mark, you have made my day!!!

Mark A. Sam said:
Alan,

In the Enter event of the Combo, try this:

Me.ActiveControl.RowSource = "SELECT CallSign, UnitId FROM tblCallsigns
WHERE (UnitId = " & cboUnit.column(3) & ") ORDER BY CallSign;"


AkAlan said:
Mark, Thanks for the help, this is kicking my ass. This works in the
rowsource but it is hard coded with a UnitId of 1.

SELECT CallSign, UnitId FROM tblCallsigns WHERE (UnitId = 1) ORDER BY CallSign

I need this to work but it errors out :

SELECT CallSign, UnitId FROM tblCallsigns WHERE UnitId = cboUnit.column(3)
ORDER BY CallSign

Thanks again for the help.


Mark A. Sam said:
I would reassign the rowsource of the callsign combobox. I think you can do
it on the EnterEvent of the combo. The where clause should be something
like..

Where [Callsign] = " & [SquadronID]

SO that you are concatinating the Value of the Squadron ID. I don't know if
the Field you are assigning is {Callsign], but whatever it is, this method
should work. If you don't understand it, try posting the SQL of the
Rowsource and I will modify it for you and try to give you better
instruction.

God Bless,

Mark A. Sam


I have two combo boxes on a form. The first displays FlyingSquadron ( I
display the Squadron Name and store the SquadronId ) the second combo box
displays the Callsign. Each FlyingSquadron has unique Callsigns and I use
the
limit to list. I need to be able to base the row source of the Callsign
combo
box on the SquadronId from the first combo box. I did this easily using an
MDB but can't get it to work now that I'm using an ADP. Thanks for any
help
provided.
 

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

Back
Top