pmathobela
Registered User.
- Local time
- Tomorrow, 00:18
- Joined
- Feb 18, 2011
- Messages
- 20
Hi All,
Please help me with the below code. The code below is suppose to open a form with selected inform on a subform. When I try running it i get 'invalid use of nulll', and when debbuging it highlites the line where I assign ID(which is an autogenerated number) to the variable lngBookmark.
******
Dim rs As Object
Dim lngBookmark As Long
'set a variable to the current record
lngBookmark = ID
'open the new form
DoCmd.OpenForm "Interview"
'take it to the selected record
Set rs = Forms!Interview.RecordsetClone
'rs.FindFirst "[ID] =" & lngBookmark
rs.FindFirst ID = lngBookmark
Forms!Interview.Bookmark = rs.Bookmark
Set rs = Nothing
*******
Thanx!
Please help me with the below code. The code below is suppose to open a form with selected inform on a subform. When I try running it i get 'invalid use of nulll', and when debbuging it highlites the line where I assign ID(which is an autogenerated number) to the variable lngBookmark.
******
Dim rs As Object
Dim lngBookmark As Long
'set a variable to the current record
lngBookmark = ID
'open the new form
DoCmd.OpenForm "Interview"
'take it to the selected record
Set rs = Forms!Interview.RecordsetClone
'rs.FindFirst "[ID] =" & lngBookmark
rs.FindFirst ID = lngBookmark
Forms!Interview.Bookmark = rs.Bookmark
Set rs = Nothing
*******
Thanx!