Help using Form to Insert new record into a Table

terbolee

Registered User.
Local time
Today, 22:15
Joined
Jan 15, 2007
Messages
17
I was testing a button in a form with an OnClick event. I wanted to see if I could use a form to insert a new record into a table, I tried the following but got a Syntax Error:

INSERT INTO Table1 (Org, Date, Name)
VALUE ('#Me.Org#', #Me.Date#, '#Me.Name#')

Org and Name fields are text fields. Date field uses dd/mm/yyyy.

I went into Form View, filled in the three fields and clicked on the button.

Can you help? Thanks.
 
Why not simply have the form bound to the table and set it where you can only add new records?
 
you would only suround dates if they are string literals

eg #01-01-2007#

Also Name is a reserved word so use something more meaningful
 
Last edited:

Users who are viewing this thread

Back
Top Bottom