Add New Record

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

Guest

I want to add new record to a table by using a query. The table has no
record and I am not appending a record from another query.

I just trying add the number "1" to my ID field to Requestor table. The
Requestor table does not have any records in it and has other fields.

How do you do this? Thank you.
 
I want to add new record to a table by using a query. The table has no
record and I am not appending a record from another query.

I just trying add the number "1" to my ID field to Requestor table. The
Requestor table does not have any records in it and has other fields.

How do you do this? Thank you.

Why? I don't see what the point would be to add a dummy record with
just one field filled in!

That said, if there are no required fields in the table, you can use a
query like

INSERT INTO Requestor(ID) VALUES (1);

The VALUES operator lets you put the values directly in the query,
rather than drawing them from some other table. I don't think you can
use it in the query grid, use the SQL window instead.

John W. Vinson[MVP]
 
What is wrong with my syntax: INSERT INTO [Request ID Number].ID
VALUES (1);

I run this SQL and it says it can find a file name. This does not make
sense to me.
I just want to add a new record in my table with [Request ID Number].ID
field being equal "1".
 
What is wrong with my syntax: INSERT INTO [Request ID Number].ID
VALUES (1);

I run this SQL and it says it can find a file name. This does not make
sense to me.

Me neither. Is that the EXACT error message - *file name*? Might it be
field name, or tablename?

Does the table [Request ID Number] exist already? Does it contain a
field named ID?
I just want to add a new record in my table with [Request ID Number].ID
field being equal "1".


John W. Vinson[MVP]
 
How about replacing the period between the table name and field name with a
space and surrounding the field name with parentheses?

INSERT INTO [Request ID Number] (ID) VALUES (1);

John Vinson said:
What is wrong with my syntax: INSERT INTO [Request ID Number].ID
VALUES (1);

I run this SQL and it says it can find a file name. This does not make
sense to me.

Me neither. Is that the EXACT error message - *file name*? Might it be
field name, or tablename?

Does the table [Request ID Number] exist already? Does it contain a
field named ID?
I just want to add a new record in my table with [Request ID Number].ID
field being equal "1".


John W. Vinson[MVP]
 
How about replacing the period between the table name and field name with a
space and surrounding the field name with parentheses?

INSERT INTO [Request ID Number] (ID) VALUES (1);

Aha... thanks John, that's almost surely it. Sharp eyes!

John W. Vinson[MVP]
 
Back
Top