By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,510 Members | 1,497 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,510 IT Pros & Developers. It's quick & easy.

A97 error #3067 occurs when it really should not

P: n/a
MLH
< < < VERY LOW PRIORITY POST > > >
When I'm creating a query in the QBE grid whose SQL looks like this...

INSERT INTO tblOwners (OwnerFName, OwnerLName, OwnerAddr, OwnerCity,
OwnerState, OwnerZip, OwnerPhone, OwnerSSN, UserID)
SELECT [Forms]![frmENF263ProcessingForm]![Text100] AS OwnerFName,
[Forms]![frmENF263ProcessingForm]![Text102] AS OwnerLName,
[Forms]![frmENF263ProcessingForm]![Text104] AS OwnerAddr,
[Forms]![frmENF263ProcessingForm]![Text106] AS OwnerCity,
[Forms]![frmENF263ProcessingForm]![Text108] AS OwnerState,
[Forms]![frmENF263ProcessingForm]![Text110] AS OwnerZip,
[Forms]![frmENF263ProcessingForm]![Text112] AS OwnerPhone,
[Forms]![frmENF263ProcessingForm]![Text114] AS OwnerSSN,
GetCurrentUser() AS UserID;

The following error is returned if I try to run it...
Query input must contain at least one table or query. (Error 3067)

Here is a description of the error...
In Microsoft Jet databases, this error occurs if you don't select a
table name when you create a query. Select at least one table or
query.
In ODBCDirect databases, this error occurs if you attempt to execute a
query that does not contain an SQL statement. Include at least one
query or stored procedure call in the QueryDef objectís SQL property.

Of course, the SQL is clearly not sourcing a table from which to pull
data destined for tblOwners. All the source data is from a form. This
is a standard query-by-form. It requires no input table or query.

And yes, the SQL runs fine from within VBA. No such error is returned
there. Can I do something different to avoid this error when creating
and running queries with the QBE grid tool?
Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"MLH" <CR**@NorthState.net> wrote in message
news:qi********************************@4ax.com...
< < < VERY LOW PRIORITY POST > > >
When I'm creating a query in the QBE grid whose SQL looks like this...

INSERT INTO tblOwners (OwnerFName, OwnerLName, OwnerAddr, OwnerCity,
OwnerState, OwnerZip, OwnerPhone, OwnerSSN, UserID)
SELECT [Forms]![frmENF263ProcessingForm]![Text100] AS OwnerFName,
[Forms]![frmENF263ProcessingForm]![Text102] AS OwnerLName,
[Forms]![frmENF263ProcessingForm]![Text104] AS OwnerAddr,
[Forms]![frmENF263ProcessingForm]![Text106] AS OwnerCity,
[Forms]![frmENF263ProcessingForm]![Text108] AS OwnerState,
[Forms]![frmENF263ProcessingForm]![Text110] AS OwnerZip,
[Forms]![frmENF263ProcessingForm]![Text112] AS OwnerPhone,
[Forms]![frmENF263ProcessingForm]![Text114] AS OwnerSSN,
GetCurrentUser() AS UserID;

The following error is returned if I try to run it...
Query input must contain at least one table or query. (Error 3067)

Here is a description of the error...
In Microsoft Jet databases, this error occurs if you don't select a
table name when you create a query. Select at least one table or
query.
In ODBCDirect databases, this error occurs if you attempt to execute a
query that does not contain an SQL statement. Include at least one
query or stored procedure call in the QueryDef object's SQL property.

Of course, the SQL is clearly not sourcing a table from which to pull
data destined for tblOwners. All the source data is from a form. This
is a standard query-by-form. It requires no input table or query.

And yes, the SQL runs fine from within VBA. No such error is returned
there. Can I do something different to avoid this error when creating
and running queries with the QBE grid tool?


If you're not "Selecting" from a table then use VALUES instead of SELECT.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2

P: n/a
MLH
Thank-you, Rick.
Nov 13 '05 #3

P: n/a
MLH wrote:
INSERT INTO tblOwners (OwnerFName, OwnerLName, OwnerAddr, OwnerCity,
OwnerState, OwnerZip, OwnerPhone, OwnerSSN, UserID)
SELECT [Forms]![frmENF263ProcessingForm]![Text100] AS OwnerFName,


I hope you read what David Fenton wrote on one of your other whinging posts.

Why do you think the error should not occur? You used select without a
table.

There's a reason for all your troubles - you whinge and complain too
much and so damn loudly everytime you run into something you're too damn
lazy to check what is one of the best help files ever made.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Nov 13 '05 #4

P: n/a
MLH
Thanks for your helpful comments.
Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.