Form Combo Box Help

lakelands

Board Regular
Joined
Jun 12, 2003
Messages
126
Hi all...

I am having some real troubles with Microsoft Access 2000 on Windows 98...

I am trying to create a database with my friends first name, last name, email address, home phone and mobile phone numbers... I have been successful thus far, but i have struck an issue...

I am trying to create a combo box that, when i click down onto the select name, the persons information is displayed... However i want the names to be alphabetical instead of based on my primary key (FriendsID)...

If I base my form combo box on my table, the event procedure works and the information is displayed... However the names in the combo box are not alphabetical...

So then i created a combo box based on my query which shows last name then first name, sorted ascending in last name. However once this box is created, the information is not re-displayed.

I tried to alter the VB code to make it work, but i get an error...

Can anybody suggest a way in which i can alphabetically sort my combo box, with the information displayed, whilst still linking it to my table "Friends"???

Thanx - Maddogz
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
In Design view in the form, go to the Combo's properties and edit the RowSource. By clicking the Build button (...) you'll see the underlying query.
Say, for example, you have [FriendID], [LastName] and [FirstName] in the table. In the query, you need 2 fields: [FriendID] and a calculated field with the expression [LastName] & ", " & [FirstName]. Now go to the Sort row below this calculated field. Make it Ascending.
Close the query grid, save when prompted, and check (under All properties) that these are set correctly -- ColumnCount should be 2; BoundColumn should be 1; ColumnWidths should be 0;3 (the second value could be any non-zero number, I just use 3).

HTH
Denis
 
Upvote 0

Forum statistics

Threads
1,221,574
Messages
6,160,602
Members
451,657
Latest member
Ang24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top