Append Query + Listbox

  • Thread starter Thread starter OscarC
  • Start date Start date
O

OscarC

Hello,

I have a form which has a listbox which displays a list of names from
Table1 depending upon what is selected from an initial drop down list.

I would like to create an append query which will append the name
which has been selected in the listbox to Table2.

Is this possible? My attempt did not work.

Thanks,

Michael
 
Michael,

INSERT INTO Table2 ( TheName )
SELECT Forms![NameOfYourForm]![NameOfYourListbox];

- Steve Schapel, Microsoft Access MVP
 
Thanks Steve, however when I run the query I get a pop up box "Enter
Parameter Value Forms!NameOfForm!NameOfListbox"



Michael,

INSERT INTO Table2 ( TheName )
SELECT Forms![NameOfYourForm]![NameOfYourListbox];

- Steve Schapel, Microsoft Access MVP


Hello,

I have a form which has a listbox which displays a list of names from
Table1 depending upon what is selected from an initial drop down list.

I would like to create an append query which will append the name
which has been selected in the listbox to Table2.

Is this possible? My attempt did not work.

Thanks,

Michael
 
Oscar,

This probably means one of two things...
1. The form is not open at the time you run the query, so obviously
the query can't find the value
2. You have incorrectly spelled the name of the form or the name of
the listbox. Er, you need to substitute the actual name of your
actual form and the actual name of your actual listbox in the
expression I gave you, and also of course the name of the actual field
in your actual table.

- Steve Schapel, Microsoft Access MVP


Thanks Steve, however when I run the query I get a pop up box "Enter
Parameter Value Forms!NameOfForm!NameOfListbox"



Michael,

INSERT INTO Table2 ( TheName )
SELECT Forms![NameOfYourForm]![NameOfYourListbox];

- Steve Schapel, Microsoft Access MVP


Hello,

I have a form which has a listbox which displays a list of names from
Table1 depending upon what is selected from an initial drop down list.

I would like to create an append query which will append the name
which has been selected in the listbox to Table2.

Is this possible? My attempt did not work.

Thanks,

Michael
 
Back
Top