Hi guys, i know you've had this question before and i've tried to follow the previous posts but still cant get my forms working properly.
my problem.
I have a main form (frmqrytblpersonnel) where name, surname, branch, region are added. this works fine. i have then put a button on the form which opens up another form based on a query (frmqrytblcaecapq).
I have a unique id in form 1 called tblpersonnelid. i need to take the value from tblpersonnelid and put it in the same field in the other form. this is what ive done from the previous posts:
Private Sub Command25_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmqrytblcaecapq"
stLinkCriteria = "frmqrytblcaecapq_tblpersonnelid =" & "'" & Me!tblpersonnelid & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToRecord , , acNewRec
Form_frmqrytblcaecapq.tblpersonnelid = Form_frmqrytblpersonnel.tblpersonnelid
End Sub
but it doesnt work....
any thoughts on how to get this begginer going?