Split form make record current record

avtuvy

Registered User.
Local time
Today, 14:04
Joined
Jan 10, 2010
Messages
39
My project includes a split form linked to a table, I added a combo box which is linked to one of the fields in the table which is a UPC code. I want to be able to select a UPC code and use the AfterUpdate event of th ecombo box to make the record with that UPC the current code and scroll the data view so that record is the on the top of the list, please help
 
I want to be able to select a UPC code and use the AfterUpdate event of th ecombo box to make the record with that UPC the current code and scroll the data view so that record is the on the top of the list, please help

Use the Combo box wizard and select "Find a record on my form...."
 
Thanks, works like a charm. I need to hide that column associated with the combo box, if I do cmb123.ColumnHidden = True It does not do the selection anymore. Is there a way to hide the column and still be able to select?
 
yeah in the combo box properties, under format you will see column width, set the first column width to 0"
 
It's set to 0, my combo box has two columns, the first one is an ID column and the second one is a UPC code which is displayed correctly. The combo box is used on a split form so on the bottom I have a spreadsheet like display of all the records. When I added the combo box it added a column on the bottom in that spreadsheet like display. If set that column to be hidden I cannot use the combo to select a current record.
 
Oh, it put the ID column in the datasheet view?
 
Sounds like you have the combo bound to a field where it should actually be an unbound control and then it finds the record that is selected.
 
the ID column of the combo box has a width of 0 and is not shown, the column with the UPC code is shown in the datasheet view, if I make it not visible than I select a value on the combo box but it does not effect the datasheet view.
 
Okay, let's visit the concept of a split form. The DATASHEET should really be on top because it is where you should be selecting a record. The Single form view part should be on the bottom because that displays the current record selected in the datasheet view. (I know that the default for Access is set up to be reversed - single form on top and datasheet on the bottom, and we've mentioned that to the Access team and hopefully they fixed that in 2010).

So, the combo box should be in the form's HEADER. And then there should be code, or Embedded Macro, created when you place the combo using the THIRD OPTION in the Wizard (find a record).
 

Users who are viewing this thread

Back
Top Bottom