R
randria
Hello,
I have a Date control called SDate on a subform linked by Main File Id with
the main form, I would like to repeat the value of SDate that has the same
Main File Id for new record. this is what I tried but I get error msg
Run-time error '3075':
Syntax error (missing operator) in query expression 'Main File Id'
Private Sub SDate_Click()
Dim PrevDate As Date
If Me.NewRecord Then
PrevDate = DLookup("SDate", "MFPDate", "Main File Id=" & [Main File Id])
Me.SDate = PrevDate
Else
End If
End Sub
Many thanks.
I have a Date control called SDate on a subform linked by Main File Id with
the main form, I would like to repeat the value of SDate that has the same
Main File Id for new record. this is what I tried but I get error msg
Run-time error '3075':
Syntax error (missing operator) in query expression 'Main File Id'
Private Sub SDate_Click()
Dim PrevDate As Date
If Me.NewRecord Then
PrevDate = DLookup("SDate", "MFPDate", "Main File Id=" & [Main File Id])
Me.SDate = PrevDate
Else
End If
End Sub
Many thanks.