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

Index numbers appearing instead of text

Status
Not open for further replies.

SmellyJohn

Technical User
Nov 4, 2003
2
GB
New user of Access so apologies in advance if probs are basic. I'm using Access 97 and have three tables - Members, Countries (one to many?) and Companies (one to many?). On a form I use a drop down box to look up the country or company the member works at, and that works fine. Problem is when I use the data to mailmerge in Word, selecting the country picks up the index number of the country and not the country name. Have tried to change the data type from number to text but it won't it!
 
The source for you merge must include the Countries table. Join on the CountryID field and add the Country description field to the query.

Duane
MS Access MVP
 
Thanks Duane. One other prob if you don't mind. I have put a button on the member form that takes me to the Company form, but when I add a new company and return to the member form, it doesn't appear in the drop down menu until you have shut the database and re-opened it. Is there a way (event?) that I can force it to update the list when I return to the member form?

Thanks, John
 
You can run some code that requeries the drop down (combo box). I would open the Company form acDialog and then include a line of code like:
Me.cboCompany.Requery
If you don't open the company form as acDialog, then the code line above will run immediately after you open the form.
You could also use the code in your main form in the On Activate event.

Duane
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top