Hello Everyone,
I'm new here so please go easy with me!
I am getting a MS Access Type Mismatch when clicking an unfiltered link to another form. I know why I get it (it is a text ID to text ID) - (the numeric links all work OK) but I just can not work out the " " and ' '
I would be most grateful if one of you guys could point me in the right direction, thanks in advance.
The code is below:
Private Sub GoToLan_Click()
On Error GoTo Err_GoToLan_Click
Dim rs As Object
Dim lngBookmark As Long
'Close the Springboard
DoCmd.Close acForm, "frmSpringboard", acSaveYes
DoCmd.Close acForm, "frmSpringboard_Docs", acSaveYes
DoCmd.Close acForm, "frmSpringboard_Lan", acSaveYes
DoCmd.Close acForm, "frmSpringboard_Pro", acSaveYes
DoCmd.Close acForm, "frmSpringboard_Ten", acSaveYes
'set a variable to the current record
lngBookmark = Me.[Landlord ID]
'open the new form
DoCmd.OpenForm "frmLandLordManagement"
'take it to the selected record
Set rs = Forms!frmLandLordManagement.RecordsetClone
rs.FindFirst [Landlord ID] = lngBookmark
Forms!frmLandLordManagement.Bookmark = rs.Bookmark
Set rs = Nothing
Exit_GoToLan_Click:
Exit Sub
Err_GoToLan_Click:
MsgBox Err.Description
Resume Exit_GoToLan_Click
End Sub
I'm new here so please go easy with me!
I am getting a MS Access Type Mismatch when clicking an unfiltered link to another form. I know why I get it (it is a text ID to text ID) - (the numeric links all work OK) but I just can not work out the " " and ' '
I would be most grateful if one of you guys could point me in the right direction, thanks in advance.
The code is below:
Private Sub GoToLan_Click()
On Error GoTo Err_GoToLan_Click
Dim rs As Object
Dim lngBookmark As Long
'Close the Springboard
DoCmd.Close acForm, "frmSpringboard", acSaveYes
DoCmd.Close acForm, "frmSpringboard_Docs", acSaveYes
DoCmd.Close acForm, "frmSpringboard_Lan", acSaveYes
DoCmd.Close acForm, "frmSpringboard_Pro", acSaveYes
DoCmd.Close acForm, "frmSpringboard_Ten", acSaveYes
'set a variable to the current record
lngBookmark = Me.[Landlord ID]
'open the new form
DoCmd.OpenForm "frmLandLordManagement"
'take it to the selected record
Set rs = Forms!frmLandLordManagement.RecordsetClone
rs.FindFirst [Landlord ID] = lngBookmark
Forms!frmLandLordManagement.Bookmark = rs.Bookmark
Set rs = Nothing
Exit_GoToLan_Click:
Exit Sub
Err_GoToLan_Click:
MsgBox Err.Description
Resume Exit_GoToLan_Click
End Sub