Topics Search

Binding multiple columns in a combobox

Binding multiple columns in a combobox
Views: 40
Well, it is a pretty straight forward question. How do I bind each of the three columns in my combo box.
Sponsored Links:

Similar posts...


Early Binding and Late Binding

Early Binding and Late Binding Icon
When coding using VBA, as a developer, you have a choice of either using Early Binding or Late Binding. Below I will attempt to explain in plain English what each technique consists of and go over their Pros and Cons. Please keep in mind the advice provided below is all relative to Early and Late Binding, nothing more.

Lookup multiple columns in combo box

Lookup multiple columns in combo box Icon
Is there a way to lookup information ina bound combo box based on either columns.

Here is a scenario I have a bound combobox with two columns Column(0), and Column(1) both visible. I want to search the combobox based on either value of both columns. In the words if Isearch ID it will lookup the value and if I search by name it will also lookup names.

Is there a sample VB script in the after update event of combo box that will accomplish that?

RowSource question

RowSource question Icon
I am using (2) combo boxes. The second is a requery from the first. I am getting "PartNumber" in the second combobox. I have several fields setup in the second combobox.

How do I get multiple fields to come out in the second combobox? Is there a way to add multiple fields to RowSource or do I need to do this differently?

Multiple combo box search for multiple columns

Multiple combo box search for multiple columns Icon
A brief background. I am trying to build a genetic database for tracking the propagation of genes in a family.

This means a particular fish can contain 1+ genes at a given time. I have separated these genes into 4 columns for easy tracking. The problem is when it comes to building a search form.

A particular gene can be in one of the 4 columns. So I need to search for that gene in all 4 columns. There are also multiple genes to search so I will need to search all 4 columns based on how many genes there are.

genes contain a key so my original plan was to transfer keys to 1 new column and run
like "*#*" AND like "*#*"
to find the genes of interest.

Validation of ComboBox values

Validation of ComboBox values Icon
Using Access 2003. I have 2 tables (t_Data and t_Standards). I have 1 form (f_DataInputTemp). The form is based on t_Data with a combobox that selects records from the t_Standards table.

This Combobox lists 5 columns; ID, DuroLow, DuroHigh, PostLow, and PostHigh (these names are shortened here)
On the form there are 2 fields where data can be input that must be validated as being between the appropriate highs and lows.

Trying to sort data into multiple columns on the report.

Trying to sort data into multiple columns on the report. Icon
Access 2007 I have 1 data column that I want to get on a report, but I want it to break into two/three columns like so and have some space inbetween the columns:

1 | 7 | 13
2 | 8 | 14
3 | 9 | 15
4 | 10 | 16
5 | 11 | 17
6 | 12 | 18

The reason is this is a single checklist for people to fill out and multiple pages is unacceptable. The list will be printed.

Combo box selection updates multiple source fields in underlying t

Combo box selection updates multiple source fields in underlying t Icon
I have one combo box with six columns. One value is tied to the underlying table. I want people to choose from the combobox, and have ALL 6 underlying fields updated according to the combo box selection. It updated the one field that has the underlying field as the record source, is there anyway to tie the remaining 5 columns to the underlying table?

Currently, the combobox relies on a separate table that populates its values (a lookup table more or less), but each field in the separate table does have a corresponding field in my main table.

I did the =column5(or whatever column) and got it to display the correct info for each column field in the form, but that doesn't affect the underlying table.

How to make cascading combobox from multiple tables

How to make cascading combobox from multiple tables Icon
I've figured out how to make a combobox choose a value and filter it for the next combobox when the fields are in the same table.

How can I make it so I have multiple tables that would work the same way. For example a Product Type (table)>Product (table)>Colors (table). So all independent tables, but making showup in cascade like they would if I had them in one table with the method I'm using now.

Cannot requery combobox from another form

Cannot requery combobox from another form Icon
It's a hot day here in the UK, but I've promised to finish some Access programming for the database that handles bookings for our training courses at work, and I can't update a combobox oneone form from a button on another form.

Form A is a waiting list of people who want to attend one of our several courses.
Form B is a bookings form where the operator selects a course from a list, a person's name from a combobox then clicks a button to make the booking.

I'm trying to make things easier for the operators by allowing them to highlight the entry for person X in form A, then click a button on form A that opens form B and writes SQL code (whichcontains a where statement that identifies the ID number of person X) to the recordsource property of the combobox.
The code then requeries the combobox to populate the rest of the columns and other controls on form B.

The problem is the combobox on form B doesn't seem to requery. I'm writing to the bound column but after .requery the columns contain nulls, but if I click the combo box it drops down toshows only one person correctly identified by the ID value I've written to it.
I can write values to text boxes on form B easily from one form to another, but the combobox has 16 columns (don't ask) so I don't want to go down the route of adding many extra hidden text boxes to form B.

DoCmd.OpenForm "BookCourses"
Forms!bookcourses!cmbFindDelegate.RowSource = strSQL1 & strSQL2

Using a combobox for searching multiple fields in "option group"

Using a combobox for searching multiple fields in "option group" Icon
I'm still having a couple problems with searches. I have a search form, frm_Search. The form I am trying to filter, frm_Form1. An unbound combobox on frm_Search, Cbo_Permit. 6 different fields bound to tbl_Table1 within frm_Form1, fld_Permit1, fld_Permit2.

The 6 bound fields are within a custom made "option group" so that users can select the related permit(s) via check boxes. I understand this is a poor design because of multiple fields in the table but it looks good on the form and each record can have multiple permits.

What I would like, is to use an unbound combobox within frm_Search, Cbo_Permit, using the names of the fields I shown above. The user then selects a permit within the combobox and presses acommand button to open frm_Form1 filtered to that particular permit.