lemming622
lemming622

Reputation: 131

Access ComboBox to TextBox

I have a Tasks tabulated form that contains a combobox for the priority listing of the task. The combobox has the row source tied to a Priority table. I have the combo box working so it displays the correct text of "Urgent, High, etc." based on the Task and Priority tables relationship.

What I would like to do is instead of a combobox for the displayed priority I'd like it to be a textbox. This is where I have problems.

How can I do this for a tabulated form and/or which fields do I need to change to accomplish this?

I have tried settings the textbox:

This one works but it is noticeably slow. Is there are "faster", better, way of doing this.

Upvotes: 0

Views: 1146

Answers (1)

June7
June7

Reputation: 21370

Why do you want a textbox? Still need a combobox to select the priority.

Is the form bound to Task table? Cannot reference the Priority table in the textbox Control Source or Default Value. A DLookup will not work in Default Value. DLookup in the Control Source should work.

Simpler approach is to set form Record Source to an SQL statement with left or right join that will 'include all records from Task and only those from Priority that match'. Bind textbox to the descriptive Priorities field from Priority. Set the textbox as Enabled No and Locked Yes so users cannot edit it.

If purpose is to mask/hide the ID then set the combobox as multi-column pulling the required fields with its RowSource SQL and hide the ID column by setting its width to 0. Or don't save the Priority ID, save the actual descriptive value. With very short descriptors and/or small databases that can be justified.

Upvotes: 2

Related Questions