![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am sure this has to do with some setting difference between the Microsoft Access install on the two user's machines, but I cannot pinpoint the problem. Here is the code: 'appends a new record and fills in the relevant fields: Private Sub btnNewDay_Click() Dim rstTemp As Recordset 'temporary recordset object Dim dtmNewDate As Date 'date of the new records Dim qdfCarried As QueryDef 'query to propagate the unprocessed carried items Set rstTemp = Me.RecordsetClone 'clone the form's recordset 'move to the last record if the recordset is not empty: If Not (rstTemp.BOF And rstTemp.EOF) Then rstTemp.MoveLast rstTemp.AddNew 'append a new record 'calculate the new date, by default the next day: '************************************************* ************************** dtmNewDate = Me!Date + 1 '**HERE IS WHERE ONE GETS AN ERROR MESSAGE** '************************************************* ************************** If WeekDay(dtmNewDate) = vbSaturday Then dtmNewDate = dtmNewDate + 2 'if next day is Saturday, skip to Monday rstTemp!BankID = Me!BankID 'fill in the BankID rstTemp!Date = dtmNewDate 'increment the date rstTemp.Update 'save the changes rstTemp.MoveLast Me.Bookmark = rstTemp.Bookmark 'move to the record End Sub '***************END OF CODE************** when it hits the line dtmNewDate = me!date + 1, while toggling through the code and placing my cursor over me!date, the value of that field is NULL. Therefore she receives a #94 Error: Invalid use of NULL, however the other user does not receive this error message when she is in the same exact database and clicks on the same exact button. Any suggestions would be very much appreciated! Thanks, Amber |
![]() |
| Thread Tools | |
| Display Modes | |
| |