Hi There
I'm trying to pre-populate some fields on a form using the following code in the on activate event:
With Me.CreatedBy
.Enabled = True
.SetFocus
.Value = tmpClass
End With
With Me.Location
.SetFocus
.Value = tmpLocation
End With
With Me.ReportedBy
.SetFocus
.Value = tmpStaffID
End With
With Me.Site
.SetFocus
.Value = tmpSite
End With
Me.CreatedBy.Enabled = False
It doesn't work. I've tried putting the code in the on open event, but the fields still remain blank. I've confirmed the variables e.g. tmpLocation, have the correct values. Any Ideas?
Thanks
I'm trying to pre-populate some fields on a form using the following code in the on activate event:
With Me.CreatedBy
.Enabled = True
.SetFocus
.Value = tmpClass
End With
With Me.Location
.SetFocus
.Value = tmpLocation
End With
With Me.ReportedBy
.SetFocus
.Value = tmpStaffID
End With
With Me.Site
.SetFocus
.Value = tmpSite
End With
Me.CreatedBy.Enabled = False
It doesn't work. I've tried putting the code in the on open event, but the fields still remain blank. I've confirmed the variables e.g. tmpLocation, have the correct values. Any Ideas?
Thanks