TextBox/Combobox problem.

shurgs

Registered User.
Local time
Today, 22:52
Joined
Jul 2, 2010
Messages
14
Hi there,
First off, I'm a bit of a "newbie" to access forms and their controls and I can't program in VBA, so forgive me if I'm missing something obvious with this question. However, I have knowledge of programming and macros, so good explanations won't be entirely lost on me.

I'm making a database in Access 07 and I want to have a set of textboxes that display the fields of a record in the table "youngperson". The record that's fields are displayed in the textboxes must be chosen by a combobox. Finally, you must still be able to edit the fields by changing the text in these textboxes.

I can make a textbox in a form edit a field in my database simply by dragging it from the "Add Exsisting Fields" and then setting the appropriate edit properties in the Form's Property Sheet.

I can also make a textbox display a different record's field using a combobox called com_yp and putting the control source of the textbox to =[com_yp].[column](x) and then selecting the record in the combobox.

My knowledge ends when I want to do both at the same time. I've messed around with this for a few days and google'd it to no avail. Please help!
Thanks,
-Jonathan
 
Assigning the textbox's Control Source with =[com_yp].[column](x) is what prevents the textbox from being editable.

You're making this way too complicated, as the Combobox Wizard has an option, # 3, that pulls the appropriate record and assigns the fields to the appropriate textboxes, leaving them open for editing.

  1. Make sure that your form is bound to the underlying table/query, including all the fields you want displayed.
  2. Add a combo box to your form.
  3. The Combobox Wizard will pop up
  4. Select "Find a record based on the value I selected in my combobox."
  5. From the table or query the form is based on, click on the field you're searching by (a field that is unique for each record) to move it to the right side.
  6. Hit Next.
  7. Size the column appropriately.
  8. Hit Next.
  9. Name the combobox.
  10. Hit Finish.
Now you can drop the combobox down and scroll down to the item to search by, or you can start to enter the item, and the combobox will "autofill" as you type. Hit <Enter> and the record will be retrieved.

Good luck!

Linq ;0)>
 
Thanks for the reply, bro! This helped me greatly.
 
Woah. The third option has dissapeared.
It only has "I want the combobox to look up the value..." and "I will type the values that I want". How do I get it back?
 
Nevermind. I didn't bind the form properly :P
 

Users who are viewing this thread

Back
Top Bottom