B
Bongard
Hi I am having a problem trying to get the data entered into a form
copied over into a second table. I would like to do that exact same
thing that I did in another from within the report only from a
different form into a different table and Access doesn't seem to be
liking my formula.
This is the old formula in my report that is working: This works,
taking fields [LN1] and [AMOUNT1] from the current form and
inserting(ior copying) them into the fields [Loan Number], and [Amount]
on the transactions table.
'This is my model from frm LTLT
'If [LN1] <> 0 Then
'strsql = "Insert Into [tbl_Transactions]([Loan Number], Amount)
Values(" & [LN1] & "," & [AMOUNT 1] & ")"
'CurrentDb.Execute strsql, dbFailOnError
'End If
This is my new formula: I am trying something similar by trying to
insert [Loan Number] and [LoanNotes] from the current form into the
[Loan Number] and [Notes] fields on the transactions table.
If [Loan Number] <> 0 Then
strsql = "Insert Into [tbl_Transactions]([Loan Number], [Notes])
Values(" & [Loan Number] & "," & [LoanNotes] & ")"
CurrentDb.Execute strsql, dbFailOnError
End If
For some reason this new formula is not working the error it is giving
me is
Run-Time error '3075':
Syntax Error (missing operator) in query expression 'Displays here
whatever note I input'
Then when I click on debut it highlights the last portion of my
formula, the CurrentDb.Execute strsql, dbFailOnError part.
If anyone could help me with this I would greatly appreciate it as I am
about 1 report away from being done with a month long project!
copied over into a second table. I would like to do that exact same
thing that I did in another from within the report only from a
different form into a different table and Access doesn't seem to be
liking my formula.
This is the old formula in my report that is working: This works,
taking fields [LN1] and [AMOUNT1] from the current form and
inserting(ior copying) them into the fields [Loan Number], and [Amount]
on the transactions table.
'This is my model from frm LTLT
'If [LN1] <> 0 Then
'strsql = "Insert Into [tbl_Transactions]([Loan Number], Amount)
Values(" & [LN1] & "," & [AMOUNT 1] & ")"
'CurrentDb.Execute strsql, dbFailOnError
'End If
This is my new formula: I am trying something similar by trying to
insert [Loan Number] and [LoanNotes] from the current form into the
[Loan Number] and [Notes] fields on the transactions table.
If [Loan Number] <> 0 Then
strsql = "Insert Into [tbl_Transactions]([Loan Number], [Notes])
Values(" & [Loan Number] & "," & [LoanNotes] & ")"
CurrentDb.Execute strsql, dbFailOnError
End If
For some reason this new formula is not working the error it is giving
me is
Run-Time error '3075':
Syntax Error (missing operator) in query expression 'Displays here
whatever note I input'
Then when I click on debut it highlights the last portion of my
formula, the CurrentDb.Execute strsql, dbFailOnError part.
If anyone could help me with this I would greatly appreciate it as I am
about 1 report away from being done with a month long project!