J
JP
I have a form with one field (Text1 - Unbound) and a table
with 2 fields (Test1 - Autonumber, Test2 - Text)
The form has a button which runs this code:
Dim SQL as String
SQL = "Insert Into Table1 (Test2) Values (" & Me.Text1
& ");"
DoCmd.RunSQL SQL
I have feeling nothing is wrong with this code yet what
happens is that Access pops up a msgbox with whatever I
typed into the unbound field and asks for a parameter.
When I put in what I had in the unbound text box into the
msgbox/parameter request it inserts it into the table.
When I leave the parameter request blank it puts in a
blank entry.
What am I doing wrong?
with 2 fields (Test1 - Autonumber, Test2 - Text)
The form has a button which runs this code:
Dim SQL as String
SQL = "Insert Into Table1 (Test2) Values (" & Me.Text1
& ");"
DoCmd.RunSQL SQL
I have feeling nothing is wrong with this code yet what
happens is that Access pops up a msgbox with whatever I
typed into the unbound field and asks for a parameter.
When I put in what I had in the unbound text box into the
msgbox/parameter request it inserts it into the table.
When I leave the parameter request blank it puts in a
blank entry.
What am I doing wrong?