Import Problem

ddrew

seasoned user
Local time
Today, 18:52
Joined
Jan 26, 2003
Messages
911
I have a function on my database that allows a user to import information into their database from another user (after saving the excel spreadsheet to a folder on their machine) (this database is stand alone and not on a network).

My problem is that the database contains a number of comboboxs. If the user imports a record that contains data that isn't in the list, the record still appears with the correct data but I would like that entry to be automatically added to the users combo box.

Is there a way that I can do this please?
 
Yup, the data is text.

Ive added a couple of screen grabs, in picture 1 you can see the name "Trecenydd Ind Est" in the Venue. In picture 2 I have exposed the combobox and its empty as I hadnt added anything to it, except this imported record.

Likewise with the field called Hide, when I imported the field says "Focus Wall" but in picture 3 "Focus Wall" is not in the list.

The field is set as Limit to List as well.
 

Attachments

  • 1.JPG
    1.JPG
    87.5 KB · Views: 97
  • 2.jpg
    2.jpg
    75.8 KB · Views: 132
  • 3.jpg
    3.jpg
    72.5 KB · Views: 101
The combo box "Focus Wall" what is it bound to?

The combo box "Focus Wall" please post its Row Source here.

Sorry for the delay, been out all afternoon!

The combobox row source is:

Code:
SELECT [tbl_TypeOfHide].[Hide] FROM tbl_TypeOfHide ORDER BY [Hide];
 
You'll need to update the source of the combo boxes (i.e. the tables their bound to).

There are a couple of steps involved:
1. Create a staging table (i.e. a table to temporarily store the data that's being imported)
2. From this table run a query to update the table bound to the combo box (for example your tbl_TypeOfHide table).
3. Requery your combo boxes.
4. Run DELETE query to delete data in staging table.

Obviously get one working first before attempting the other combo boxes.
 

Users who are viewing this thread

Back
Top Bottom