I need a field in a form that can do one of two things .... if the field contains a badge number then add the corresponding employee name from a table or if the field has no badge number then let me add my own employee name
How about a combo box (with limit to list set to no), and a text box
Define the combo box with two columns (BadgeId and Name).
In the after update event put code so
if not isNull(cboBadgeId.column(1)) Then
txtName = cboBadgeId.column(1)
end if
Now if you type in a BadgeId which exists, the name of the EE will be put in the textbox, if not you can type in the name.
If you want to get more sophisticated, use of .Enabled, .Locked and .SetFocus Properties will allow you to step over the text box if BadgeId exists, and to lock it to prevent user entry
Regards
Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now -
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.