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

Msgbox from a Subform not showing up on Parent form

Status
Not open for further replies.

logout151

IS-IT--Management
Nov 15, 2000
24
US
Hello All,

Thanks in advance for your help.

I am working with a Parent form that has 3 subforms. Each or these is based on a single table. I have set up a delete button in each subform that erases the current selected record. However, the tables in the subforms have relationships that do not allow every record to be deleted.

When you click on the delete button on a related record, I cannot get a msgbox to show up saying "You cannot delete.......". The code sees the msgbox and I step through it, but it doesn't show up on the screen. The record is not deleted, but I cannot get Access prompt the user as to why.

Note: If I select the record and hit the "delete" keyboard key, I get the warning though, it just the code that won't work.

Any suggestions?

-Log
 
I suspect the code is not running at all.

Did you put a stop on it (Press F9) on a non "Dim" line

Then view your form, click whatever you do to make it run your code. If it does not pop up and show the VBA window then it's not running it.

DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
When I put a stop in it, it works fine since and the msgbox comes up. But I can't get it to show will I am on the parent form.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top