Wierd form error

  • Thread starter Thread starter Vic Spainhower
  • Start date Start date
V

Vic Spainhower

Hello,

I have a form that is doing some strange things. There is a button on the
form that simply deletes the displayed record. When the button is pressed
the first thing it does is display a message to confirm the delete. However,
what happens is it makes a sound but no message is displayed. If I press the
Alt key the message is displayed. If I select no to not delete the message
it is supposed to display a confirming message but only makes the sound.
Pressing the ALT key will display the message.

Any ideas on what's causing this? In my backup database the form is working
correctly and I've imported that form but it hasn't resolved the problem.
I've also decompiled the database which again did not help.

Vic
 
Not much, here it is:

Private Sub cmdExit_Click()
On Error GoTo Err_cmdExit_Click
Dim Resp As Long
Dim db As Database
Resp = MsgBox("Are you sure you want to delete this entry?", vbYesNo, "Show
Secretary")
If Resp = vbYes Then
Set db = CurrentDb
db.Execute "DELETE FROM InternetEntries WHERE SessionID = '" &
Me!SessionID & "'"
db.Execute "DELETE FROM InternetRiders WHERE SessionID = '" &
Me!SessionID & "'"
db.Execute "DELETE FROM InternetClasses WHERE SessionID = '" &
Me!SessionID & "'"
MsgBox "Entry Deleted!", vbInformation, "Show Secretary"
Me.Requery
Else
MsgBox "Entry not deleted.", vbInformation, "Show Secretary"
End If

Exit_cmdExit_Click:
Exit Sub

Err_cmdExit_Click:
MsgBox Err.Description
Resume Exit_cmdExit_Click

End Sub
 
Hello,

I found this same problem is a post in 1999 with the exact same behaviour
running Access 97! He could also tab to another application and it would
force the message to be displayed (I can to). He had put a DLookup in the
control source of a Combo box and felt Dlookup ate up the resources so
Access couldn't display the message. It probably is a resource issue but I
don't have any dlookups in this form. How can I tell if it is a resource
issue and where they are going??

Vic
 
Hello,

oops - there is a dLookup in the control source of a text box (wonder who
could have done that?). Removing it fixes the problem.

Vic
 
OK Vic...
Glad you found that. That would have been really tough to shoot that bug "remotely"
via email.
And... good for you for getting in there and digging out the problem yourself.
I too wonder "who the heck did that??? :-D
--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top