K
K Crofts
Hi. I have added a command
button to my form which acts as a 'go' button for my
calender control. this has stabalised my database and i
only have one problem now. When i exit my database and
save the information to my form i am unable to recall the
information to the form from the table even though the
information has definately saved on the table. I have
added my code below, any ideas?
Private Sub GoButt_Click()
If IsNull(DFirst("Date", "Table content", "Date=#" & Format
(Me.Calendar2, "dd\/mmm\/yy") & "#")) Then
'no record. go to new record
Me.Date.SetFocus
DoCmd.GoToRecord , , acNewRec
'here moved line from above
Me.Date = Me.Calendar2.Value
Else
'position form on record with selected date
'Calendar2 used here:
Me.RecordsetClone.FindFirst "Date=#" & Me.Calendar2
& "#"
If Not Me.RecordsetClone.EOF Then
Me.Bookmark = Me.RecordsetClone.Bookmark
End If
End If
button to my form which acts as a 'go' button for my
calender control. this has stabalised my database and i
only have one problem now. When i exit my database and
save the information to my form i am unable to recall the
information to the form from the table even though the
information has definately saved on the table. I have
added my code below, any ideas?
Private Sub GoButt_Click()
If IsNull(DFirst("Date", "Table content", "Date=#" & Format
(Me.Calendar2, "dd\/mmm\/yy") & "#")) Then
'no record. go to new record
Me.Date.SetFocus
DoCmd.GoToRecord , , acNewRec
'here moved line from above
Me.Date = Me.Calendar2.Value
Else
'position form on record with selected date
'Calendar2 used here:
Me.RecordsetClone.FindFirst "Date=#" & Me.Calendar2
& "#"
If Not Me.RecordsetClone.EOF Then
Me.Bookmark = Me.RecordsetClone.Bookmark
End If
End If