Pre-populated Form Fields (1 Viewer)

SalisburyLad

Registered User.
Local time
Today, 07:24
Joined
Jun 12, 2010
Messages
17
Hello Gurus,

I'm not quite sure how to word this but here goes.....

I have a form that collects data from a survey. The survey has been undertaken before and the equipment being surveyed may carry an ID number and I have the original survey data in a table. If the old survey ID is entered into a field it automatically populates several other fields with the original data....neat! But that data is not necessarily correct and for this survey I am going to great lengths to ensure the data is as "normalized" as possible so the data is prepopulated into a field with validation. Normally when something is entered into these combo fields I validate with a not in list event and ask if the entry should be added. If I prepopulate with a me.xxxxxx = oldsurveydata the entry is accepted without question. Is there some way to fire the not in list event? I've tried me.repaint, requery etc. but no success.

I hope this makes sense?

TIA
 

pr2-eugin

Super Moderator
Local time
Today, 04:24
Joined
Nov 30, 2011
Messages
8,494
So what is the code you currently have to prepopulate the Form?
 

SalisburyLad

Registered User.
Local time
Today, 07:24
Joined
Jun 12, 2010
Messages
17
I have the following in the "On Change" event from the original data field:

Code:
Private Sub OrigAsset_Change()
If Not IsNull(Me.OrigAsset.Column(1)) = True Then
'Me.DESCRIPTION = Me.OrigAsset.Column(1)
End If
If Not IsNull(Me.OrigAsset.Column(2)) = True Then
Me.Make = Me.OrigAsset.Column(2)
End If
If Not IsNull(Me.OrigAsset.Column(3)) = True Then
Me.Model = Me.OrigAsset.Column(3)
End If
If Not IsNull(Me.OrigAsset.Column(4)) = True Then
Me.SerialNumber = Me.OrigAsset.Column(4)
End If
If Not IsNull(Me.OrigAsset.Column(5)) = True Then
Me.Capacity = Me.OrigAsset.Column(5)
End If
If Not IsNull(Me.OrigAsset.Column(6)) = True Then
Me.CapacityUnit = Me.OrigAsset.Column(6)
End If
If Not IsNull(Me.OrigAsset.Column(7)) = True Then
Me.LOCALID = Me.OrigAsset.Column(7)
End If
End Sub
 

Users who are viewing this thread

Top Bottom