I am adding records in Access in Table View, and I want to change the upcoming record (to be added) with the same values in most fields, to speed input.
So I do this by changing the default value for each field using the ‘Lost_Focus Procedure’ event, something like this:
Procedure Lost_Focus
field.defaultvalue = [field]
End
This works for all fields except one. It is a text field, with a drop=down box, and has pipe size values.
The trouble occurs when the user selects “1-1/2” which means 1.5 inch pipe size, but the Procedure above sets the next record value to 0.5 because 1-1/2 is interpreted as a number expression, not text.
[FONT="]Similarly, the text pipe size “1-3/4” will get changed to 0.25
[/FONT]
So I do this by changing the default value for each field using the ‘Lost_Focus Procedure’ event, something like this:
Procedure Lost_Focus
field.defaultvalue = [field]
End
This works for all fields except one. It is a text field, with a drop=down box, and has pipe size values.
The trouble occurs when the user selects “1-1/2” which means 1.5 inch pipe size, but the Procedure above sets the next record value to 0.5 because 1-1/2 is interpreted as a number expression, not text.
[FONT="]Similarly, the text pipe size “1-3/4” will get changed to 0.25
[/FONT]