eggwater
life as a rehearsal
- Local time
- Today, 22:36
- Joined
- Aug 14, 2003
- Messages
- 69
hi folks
I currently have the following code on a form:
Private Sub Form_BeforeUpdate(Cancel As Integer)
With Me
If .Dirty Then
If .NewRecord Then
.date_stamp = Now()
.Export_ctrl = "1"
Else
.date_stamp = Now()
.Export_ctrl = "2"
End If
End If
End With
End Sub
This automatically generates data in two fields depending on whether the record is New or Amended.
My problem is that I have two types of export criteria NEW and AMENDED - the above code works - but I have another field ROOM NUMBER that also plays a part in whether the record is exported or not - i.e. if no ROOM NUMBER exists then the record is not exported.
However if a Room Number is not entered in a New record till a later date the record then becomes Status AMENDED when it hasn't actually been exported yet. I need the code to work so that new unexported records remain that way until they have been exported.
can anyone help?
I currently have the following code on a form:
Private Sub Form_BeforeUpdate(Cancel As Integer)
With Me
If .Dirty Then
If .NewRecord Then
.date_stamp = Now()
.Export_ctrl = "1"
Else
.date_stamp = Now()
.Export_ctrl = "2"
End If
End If
End With
End Sub
This automatically generates data in two fields depending on whether the record is New or Amended.
My problem is that I have two types of export criteria NEW and AMENDED - the above code works - but I have another field ROOM NUMBER that also plays a part in whether the record is exported or not - i.e. if no ROOM NUMBER exists then the record is not exported.
However if a Room Number is not entered in a New record till a later date the record then becomes Status AMENDED when it hasn't actually been exported yet. I need the code to work so that new unexported records remain that way until they have been exported.
can anyone help?