Hi,
I got two questions:
1.
2.
Subsequently I would like to use the added information (from question 1) and link this to a value in another table. Therefore I need the autonumber which Access has given to the row. How can I get this value and use it in an update query (which will be called in vba code)
I hope someone could help me with one or both of my questions.
Thanks in advance!
I got two questions:
1.
I have written a vba code which should append data to a table called; 'tblActionsTaken". The data is given by the user. access works with 2 of the 3 fields. The third field (or first in de vba code) gives an error. The value is selected in a combobox containing a Yes or No, this value has to be transferred to the field called "LastTimeBuy" which Yes/No Boolean data type. I verified, by using a MsgBox that the value of the combobox is "True" or "False". The error I get can be found in a screenshot which I attached to this post.
The code I'm using is as follows:
The code I'm using is as follows:
Code:
DoCmd.RunSQL "INSERT INTO tblActionsTaken (LastTimeBuy, ActionDate, ActionDetails) " & "VALUES(" & "'" & Me.lstLastTImeBuy & "'," & "'" & Me.txtActionDate & "'," & "'" & Me.txtActionDetails & "') "
2.
Subsequently I would like to use the added information (from question 1) and link this to a value in another table. Therefore I need the autonumber which Access has given to the row. How can I get this value and use it in an update query (which will be called in vba code)
I hope someone could help me with one or both of my questions.
Thanks in advance!