May 9th, 2003, 12:10 PM
Join Date: May 2003
Time spent in forums: 32 sec
Reputation Power: 0
The only way I know to make a field predictive of what I type is by using a Lookup (this is where I think my problem lies.)
This is the code to allow the Auto Fill of Start Location And Start Postcode but this code will not work if the Startpoint was chosen from a Lookup.
Private Sub StartPoint_Exit(Cancel As Integer)
Dim varStartLocation, StartPC As Variant
varStartLocation = DLookup("ADDRESS", "tblPointsInfo", "NAME = [StartPoint]")
varStartPC = DLookup("POSTCODE", "tblPointsInfo", "NAME = [StartPoint]")
If (Not IsNull(varStartLocation)) Then Me![StartLocation] = varStartLocation
If (Not IsNull(varStartPC)) Then Me![StartPC] = varStartPC
I have a table called “tblPointsInfo” this is where the information is being referenced from, I also have a table called “Questions” this is where the information being entered into the form is going.
I hope this elaborates a bit more and thank you for your time and effort.