Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 259
  • Last Modified:

On a combo box I want to select the Primary Key for a field, but display a user's name how do I do this?

Hello, I have a form with cboUser, and a table with User_ID (autonumber) and UserName. I want the cboUser to show UserNames but store the autonumber.  How would I do this?

Thanks,
Bevo
0
Bevos
Asked:
Bevos
1 Solution
 
dqmqCommented:
ComboBox Properties:
RowSource = "select User_id, Username from YOURTABLE"
Control Source = User_id
Column Count = 2
Bound Column = 1
Column Width = 0;
0
 
Tyler LaczkoCommented:
you can set these in the properties of the combo box.

control source and bound column
0
 
BevosAuthor Commented:
Thanks both of you, Bevo
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now