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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to do ComboBox Refresh after new entry and some other. 1

Status
Not open for further replies.

ddelport

Technical User
Jan 24, 2004
27
ZA
I am in the process of designing a database for logging queries. The idea works like this, someone supposedly phones and you have to log a (real-life)query on an Access form. When the person identify him/herself you have to either select the person from a combobox control which is easy. If the caller is a first-timer though you have to do a new entry in the parent table via another form. I have used a prior yes/no field with a conditional macro combined with an event procedure for this control to "trigger" a new form to load once it was indicated that it is in fact a new caller. Now a new entry is done and the form is closed. The focus is now back to the original form and this new entry should show up in the combo-box. My problem is that at this point the combo-box list is not updated yet for some unknown reason. I have tried numerous ways to build in a macro to refresh this list but to no avail. I don't want to have to require the operator to manualy refresh every time. The idea is after all to make it one smooth process. What am I to do?

As they say a little knowledge is dangerous and now that people have noticed my newly acquired skills (although I stil have a lightyears to go) I have yet another problem with another database. I download a product list frequently with the intension to update my own current db-table. This is a humangous text file of about 24Mb and every time I try to import this list MS Acces (after taking an age and seemingly stalling) complains about the first row being too long. The total columns is only about 256 characters long although there are a couple of (tens/hundreds of thousends) records. Is this too much for MS Access to handle? This file size is expected to grow to about 250 000 records...
 
About your first problem, you mentioned refreshing has failed.

Have you tried Requery? I assume you haven't, but if you have, forgive me. Say you put a macro on the gotfocus of combo box that calls a macro. Say your Comobox is called MyComboBox. The macro would say "Requery" and under the specifics tab you would put only MyComboBox. That should probably do it.

Second problem, you say you are importing. I recomend that you try instead of importing the data, you set up an ODBC link to the text file, and use an append query to update your table agsint the ODBC table.

Hope this helps.

ChaZ

Ascii dumb question, get a dumb Ansi
 
Thanks Blorf/ChaZ! - I will try that requery thing, forgive me dumb question but this is one big learning curve for me. Dunno why I haven't noticed this command before nor do I know what exactly it means, and Microsoft's explanations aren't always that explanatory as what a novice might expect especialy if English is not your mothertongue.

I seem to have found the solution to my second problem. My personal PC is bigger and faster than the other one and I am using Access in Office XP rather than '97. The ODBC solution you suggested I will reserve for when I doen't need to Ascii dumb questions about Access anymore...

Your input is highly appreciated, it means a lot to a self-learner.

Fanx,

Dix
 
Hi. Glad to help.

What requey does, is force any object that has a query or sql as its data source to recalculate the data.



Ascii dumb question, get a dumb Ansi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top