Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

append query running of a form isn't working....

Status
Not open for further replies.

dmbfan715

Technical User
Jun 27, 2002
20
US
I'm running an append query to add ONE record to a table (autonumber primary key). On the mainform (form A), there's a button to open another form (form B), which is what the append query is running off of. Some of the fields in form B are automatically filled with info from form A. Here's my code:


INSERT INTO tblDiscrepancy (CounterpartyID, DealID, TradeDate, DealTicketNumber, EntityID, DateDiscrepancyNoted, DiscrepancyDescription)
SELECT ([Forms]![frmAddDiscrepancy]![txtTradeDate], etc, etc (for all of the other fields);


I get an error message saying "query input must contain at least one tabel or query". i've tried different things, but nothing is working. any suggestions??


-shivani
 
Hi

SQL Says

INSERT INTO tblDiscrepancy (CounterpartyID, DealID, TradeDate, DealTicketNumber, EntityID, DateDiscrepancyNoted, DiscrepancyDescription)
SELECT ([Forms]![frmAddDiscrepancy]![txtTradeDate], etc, etc (for all of the other fields);

Error says

I get an error message saying "query input must contain at least one tabel or query".

well is there a table name in the second SELECT?, thre is not in the snip you included with the post
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top