Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing items in a combo box 1

Status
Not open for further replies.

Heeeeelp

Technical User
Jan 5, 2006
39
CA
Hi Everyone,

I have created a form which uses a couple of combo boxes and limits the users response to one of the items listed. I need to revise this list by removing some of the current items and creating new ones. Can someone please let me know how I do this without effecting the records that have already been entered in the database. If I replace an old item with a new one, the old records are deleted or overwritten with the new item I have associated to the ID number.

Any help with this would be greatly appreciated.

Regards,
Tess
 
You cannot remove an item or change an ID in a look-up without seriously affecting existing records. If you wish to hide some items add a 'current' column and only select items that are current when there is a new record. If this combo is not yet based on a table, create one.
 
How are ya Heeeeelp . . .

Are the comboboxes [blue]bound?[/blue]

Calvin.gif
See Ya! . . . . . .
 
Heeeeelp
Have you had a chance to look at my answer?
 
Hi Ramou,

I did, thank you. The combo box is based on a table. I understand that and changes to the original list would effect the table and that I should add a current list but how would it work to hide the original list. If users are accessing a record that was created using the original list, when going into a form, they would need to see the data based on the original list. If I'm using two different columns, how do I toggle between both depending on which case is being selected.

I appreciately your help with this Ramou.

Tess
 
What you need is a list that looks like this:

[tt]ID Description CurrentYN
1 Aardvark y
2 Bat n
3 Cougar y[/tt]

Use the current event of the form to check if the record is new and set the combobox accordingly:

[tt]If Me.NewRecord Then
Me.cboCombo.RowSource="Select ID, Description From tblLookUp Where Current"
Else
Me.cboCombo.RowSource="Select ID, Description From tblLookUp"
End If[/tt]

The snippet above is just a sketch. You will also need to limit the combobox when old records are being updated, if that is permitted.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top