HI all,
Having issues with an Insert Into Statement. Attached is db, opens to TransactionFrm....
Trying to insert two records into table AccountLedgerTbl and getting errors.
It appears the GUID number doesnt want to go into that table? If I take it out from the insert into then
I get asked for parameters for "description" and "Method" fields?
Could someone take a look at this for me please...
When i hit submit button, it should put two records in the table AccountLedgerTbl and i cant figure out
what i have done wrong?
Thank
Dave
Code:
Private Sub CmdSubmit_Click() If IsNull(CboFromAccountID) Or IsNull(CboToAccountID) Then
MsgBox "You're missing some data!"
Exit Sub
End If
DoCmd.SetWarnings False
DoCmd.RunSQL "INSERT INTO AccountLedgerTbl (TransID, AccountID, TransDate, GUID, Description, Method, Debit) " & _
"VALUES (" & TxtTransID & ", " & CboFromAccountID & ", " & TxtTransDate & ", " & TxtGUID & ", " & TxtDescription & ", " & TxtMethod & " , " & TxtAmount & ")"
DoCmd.RunSQL "INSERT INTO AccountLedgerTbl (TransID, AccountID, TransDate, GUID, Description, Method, Credit) " & _
"VALUES (" & TxtTransID & ", " & CboToAccountID & ", " & TxtTransDate & ", " & TxtGUID & ", " & TxtDescription & ", " & TxtMethod & " , " & TxtAmount & ")"
DoCmd.SetWarnings True
DoCmd.Close
End Sub
Account.zip