Adding items to combobox list permanantely

lovett10

Registered User.
Local time
Today, 09:02
Joined
Dec 1, 2011
Messages
150
Hi with a button im trying to copy a table (which does succesfully)
and add the new table name to a combobox. <--- where the problem starts

Here is my current code
Code:
Private Sub Command7_Click()
DoCmd.CopyObject , Me.Combo16, acTable, Me.Combo16
Combo28.AddItem Item:=Me.Combo16 & Me.Text18
End Sub

Initially it appears to work, however when you go into design view and back to form view all the added items dissappear

Ive looked around and seen some people mention SQLs unfortunately i havent a clue what they are :(

any help would be appreciated especially if it doesnt invlove SQLs :P

Thanks
 
What you are trying can only be done in Design mode and then saved so it is not practical in use.

You need to use the Table/Query RowSourceType to populate the combo directly from the table records. Add the table name to the records and requery the combo.
 

Users who are viewing this thread

Back
Top Bottom