473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Column Property of a Combo Box

How do I have a textbox on a subform automatically fill in with a
value after I select an item from a combo box on a form (e.g., select
a product name in a combo box and have the subform populate based on
THAT EXACT product name)?

I want the entire subform to populate based on the selection from the
combo box. Do I have to bind every textfield on the subform or only
the product name textbox?

Thanks for any information
Nov 12 '05 #1
1 2519
Base your combobox on a query based on your product table. Include the fields
ProductID and ProductName. Set the bound column property to 1, column count to
2, and field width to 0;1.5. Place the combobox on the main form, name the
combobox, MyCombobox, and make it unbound.

Your subfrom needs to display records from a table that has ProductID as a
foreign key. Create a query based on this table and include the field ProductID
with the other fields you want to display in the subform. Put the following
expression in the criteria of the ProductID field:
Forms!NameOfMainForm!MyComboBox

When you select a product in the combobox, the subform will now display all the
records related to the product you chose.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"martim07" <ma******@hotmail.com> wrote in message
news:85**************************@posting.google.c om...
How do I have a textbox on a subform automatically fill in with a
value after I select an item from a combo box on a form (e.g., select
a product name in a combo box and have the subform populate based on
THAT EXACT product name)?

I want the entire subform to populate based on the selection from the
combo box. Do I have to bind every textfield on the subform or only
the product name textbox?

Thanks for any information

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Daniel Tan | last post by:
Hi, how can i obtain the value of combobox multiple bound column data ? Eg, if i select combo box, it has more than one field, name and age and id listed. Pls advise, thanks. Regards, Daniel
3
by: ssb | last post by:
Hello, This may be very elementary, but, need help because I am new to access programming. (1) Say, I have a column EMPLOYEE_NAME. How do I fetch (maybe, cursor ?) the values one by one and...
2
by: Todd | last post by:
Hello, I'm curious if anyone knows of a way (if one exists) to tell a form (in Access 2002 VBA) to sort on an unbound column of a combo box on the form. Here's what I want to do: A combo box...
2
by: Todd | last post by:
Hi. I want to sort the records on my form (using either a continuous form or a datasheet) by the unbound "description" column in a combo box on the form (or in the datasheet.) Here's a rough...
2
by: Ed via AccessMonster.com | last post by:
Hi all, What I am trying to do is get the value of the second column of a bound combo box in vba. example: Combo box: column 1-ID column 2-SIGN_CODE 1 R-1.gif 2 ...
3
by: Cindi Simonson | last post by:
Hi, I have a form with a combo box containing 4 columns of data. The form also contains 3 print buttons where the goal is to open 3 different reports according to the value in one of the...
2
by: Arnie | last post by:
I have searched this NG for datasheet column width posts and have read many of them. None of them seem to address what I would like to do. I'm beginning to think what I want can't be done. Here...
2
by: Mike L | last post by:
How do I get the value in the first column of a combo box? cboRails.DataSource = ds1.Tables; cboRails.DisplayMember = "Description"; The combo box shows the "Description" column of my table....
4
by: Torilyn73 | last post by:
I have a combo box set up off a query. I want the default value to be the column heading so I don't have to put a label over it. So far I haven't been able to figure this out. Can anyone tell me if...
2
by: Exick | last post by:
This is more of a minor annoyance/curiosity than a real problem, but I'm wondering if anyone here can provide some answers. I have a form bound to a table with lots of controls on it that are...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.