G
Gaetanm via AccessMonster.com
I'm new at this and I have Inherited this data base.
There are issues such as spaces in column names columns miss lable to what
they represent and other challenges.
I'm trying to add records (one at a time) into a job sheet table via a form.
The Job sheet table consist of the following:
Job ID Auto
CustomerID Number
Customer Name Number (this is NOT a
type O it is a #
and not a name)
Customer Order No Text
Start Date Date/Time (short)
Stop Date Date/Time (short)
Contact Text
Invoice No Number
Notes Memo
Markup Number
Supplier ID Number
Sales Tax Number
On my form I have the following:
cboCustomer Customer ID # from Customer table
Text box =cboCustomer.Column (1)
(this shows customer name)
txtDate Date()
txtJobDescrition Text
I'm trying to INSERT through a command button
cboCustomer to Customer Name
txtDate to Start Date
txtJobDescrition to Notes
The following is the SQL I started with cboCustomer and txtDate and got run-
time error 3134 something wrong with me syntax. Can you please help I can't
go to txtJobDescrition till at least this portion works.
Private Sub RECORD_Click()
DoCmd.SetWarnings True
Dim SQLstrg As String
SQLstrg = "INSERT INTO Job Sheet (Customer Name,Start Date,)" & "VALUES(" &
Me.[cboCustomer] & ",#" & Me.[txtDate] & "#)"
DoCmd.RunSQL SQLstrg
End Sub
PS This String is one continuos line
Thanks
Gaetanm
There are issues such as spaces in column names columns miss lable to what
they represent and other challenges.
I'm trying to add records (one at a time) into a job sheet table via a form.
The Job sheet table consist of the following:
Job ID Auto
CustomerID Number
Customer Name Number (this is NOT a
type O it is a #
and not a name)
Customer Order No Text
Start Date Date/Time (short)
Stop Date Date/Time (short)
Contact Text
Invoice No Number
Notes Memo
Markup Number
Supplier ID Number
Sales Tax Number
On my form I have the following:
cboCustomer Customer ID # from Customer table
Text box =cboCustomer.Column (1)
(this shows customer name)
txtDate Date()
txtJobDescrition Text
I'm trying to INSERT through a command button
cboCustomer to Customer Name
txtDate to Start Date
txtJobDescrition to Notes
The following is the SQL I started with cboCustomer and txtDate and got run-
time error 3134 something wrong with me syntax. Can you please help I can't
go to txtJobDescrition till at least this portion works.
Private Sub RECORD_Click()
DoCmd.SetWarnings True
Dim SQLstrg As String
SQLstrg = "INSERT INTO Job Sheet (Customer Name,Start Date,)" & "VALUES(" &
Me.[cboCustomer] & ",#" & Me.[txtDate] & "#)"
DoCmd.RunSQL SQLstrg
End Sub
PS This String is one continuos line
Thanks
Gaetanm