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!

MsgBox Error PopUp with Primary Key in Quotes 1

Status
Not open for further replies.

BigMikeT76

Technical User
May 8, 2010
15
US
I've attached my database in Access 2007. I am getting a MsgBox Popup with the docID (my primary key for my main table) in quotes. I can't figure out what I wrote in the code to cause this or if it is something more major than I can see (I'm very new to VBA). Does anyone know why this is happening and how I can make it go away???


To see the error I am concerned with:

Open Database link.

From the form that pops up on opening the database (frmMainMenu), select the option "SOP Document Tracking" from the SOP Document Management option group.

A MsgBox will Pop Up with directions to "Find document on next form and then select OK." Select "OK"

Then a form (frmDocSearch) will Pop Up. Select any row from this form and select "OK".

This is where my error appears. A Pop Up box with a number which corresponds to that document's docID, which is the Primary Key for tblDocumentInformation. It says "Microsoft Office Acc..." but it is not resizable so I can't see the rest of it.

After you select "OK" it goes away and pulls up the correct form. But I'm thinking this is from one of the error handlers. I came in during the middle of this database's development and I'm not sure if it is part of the code I wrote or from my predecessor.

Any suggestions would be greatly appreciated!!
 
Hi,

I downloaded your db.

That msg pop up comes from the "setProperties" procedure inside frmMasterTabForm. Look at the line of code:

MsgBox frmType

To debug through the whole process, set the breakpoint at cmdOK_Click() procedure inside the frmDocSearch.

 
BigMikeT76,
Is there a reason why you are using option groups on your main menu rather than simple command buttons? When you return to your main menu, you can't "SOP Document Tracking" until you select something else and then re-select "SOP Document Tracking".

Option groups are for setting option (or other) values, not necessarily navigating around through other forms.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top