Question Locked

Access 2007 - Checkbox Control

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Novice Here. I am looking at providing a few check-boxes on a form. When one is checked a textbox control would change its control source. For example, if a user selects the first check-box (entitled First Name) the control source for a textbox would become [table].[fname], if they select the second check-box (entitled Last Name) the same textbox would change its control source to [table].[last name]. It seems like it should be simpler than I am trying to make it, but I am having issues finding references.

Thanks,

Joel

2 replies

by john.a.wills

Really you should use radio buttons for this, because the choices are obviously mutually exclusive. The technique is to have a change event in VBA
select case me.radiobuttonvalue
case 1 me.namebox.data = 'FirstName'
case 2 me.namebox.data = 'Nickname'
etc.

This discussion is closed to new replies.