Sniper-BoOyA-
Registered User.
- Local time
- Yesterday, 18:44
- Joined
- Jun 15, 2010
- Messages
- 204
Good Morning,
 
I ve got the following question.
 
Ive got a table, with one field using a lookup function, linked to a table with settings for the press-machine. Untill now the user had to select the setting he/she wanted.
 
It turns out, the setting depends on the diameter of the sample.
 
So, i would like to help them a bit, and do it automatically.
 
The layout of the setting table is as follows.
 
nr
test
material
micrometer
ring
spring
setting
 
What i would like to do is:
 
If the diameter of the sample is 100, then the list should select nr 1 automatically, and if the diameter is 150, then the list should select nr 2 automatically.
 
Ive put this in last data-entry field (afterupdate event).
 
	
	
	
		
 
Persinstelnr is the name of the field which the user uses to select the right settings.
 
But it doesnt seem to work. What am i doing wrong?
 I ve got the following question.
Ive got a table, with one field using a lookup function, linked to a table with settings for the press-machine. Untill now the user had to select the setting he/she wanted.
It turns out, the setting depends on the diameter of the sample.
So, i would like to help them a bit, and do it automatically.
The layout of the setting table is as follows.
nr
test
material
micrometer
ring
spring
setting
What i would like to do is:
If the diameter of the sample is 100, then the list should select nr 1 automatically, and if the diameter is 150, then the list should select nr 2 automatically.
Ive put this in last data-entry field (afterupdate event).
		Code:
	
	
	If Me.diameter.Value = 100 Then Me.persinstelnr.Value = 1 Else
If Me.diameter.Value = 150 Then Me.persinstelnr.Value = 2
End IfPersinstelnr is the name of the field which the user uses to select the right settings.
But it doesnt seem to work. What am i doing wrong?
 
	


 
 
		