473,320 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Hide and Seek with Message Boxes

1,271 Expert 1GB
Cheers, everyone. Thanks in advance for any help you can offer.

Sometimes my Access program appears to lock up. The user is sitting there, waiting for something to happen after they hit a button, and nothing happens. If they have their speakers turned on, they hear a "bonk."

What's really happening is that the program attempted to display a message box and the message box window is hiding behind another window. If you happen to do an Alt/Tab, then suddenly you see there's this message box waiting for you to click the "okay" button.

I can't see any rhyme or reason to it. Often the message box appears as it should, then a minute later, the same button press is done and the message box does not appear, we just hear the "bonk" sound the message box gives.

What causes this and what can I do about it?

Thanks,
Jim
Oct 14 '06 #1
4 1947
MMcCarthy
14,534 Expert Mod 8TB
What code is appearing after the code to display the message box. It sounds like something else is subsequently getting focus. Does the message box have a vbOK button on it?



Cheers, everyone. Thanks in advance for any help you can offer.

Sometimes my Access program appears to lock up. The user is sitting there, waiting for something to happen after they hit a button, and nothing happens. If they have their speakers turned on, they hear a "bonk."

What's really happening is that the program attempted to display a message box and the message box window is hiding behind another window. If you happen to do an Alt/Tab, then suddenly you see there's this message box waiting for you to click the "okay" button.

I can't see any rhyme or reason to it. Often the message box appears as it should, then a minute later, the same button press is done and the message box does not appear, we just hear the "bonk" sound the message box gives.

What causes this and what can I do about it?

Thanks,
Jim
Oct 14 '06 #2
jimatqsi
1,271 Expert 1GB
Here is a typical example of a button that sometimes hides the message box widnow ...
Expand|Select|Wrap|Line Numbers
  1. Private Sub btn_ConfirmOrder_Click()
  2.     Dim byteResponse As Byte
  3.     byteResponse = MsgBox("Confirm Order", vbOKCancel, "Confirm Order")
  4.     If byteResponse = vbCancel Then GoTo endroutine
  5.  
  6.     Dim db As Database
  7.     Dim rs As DAO.Recordset
  8.  
  9.     Set db = CurrentDb
  10.     Dim str_tempPONumber As Variant
  11.  
  12.     str_tempPONumber = Me!txt_OHPONumber  '
  13.     If Len(str_tempPONumber) < 1 Then GoTo Err_NoPONumber
  14.     If (str_tempPONumber = Null) Then GoTo Err_NoPONumber
  15.  
  16.     Set rs = db.OpenRecordset("tbl_OrderDetails")
  17.     On Error GoTo Loopend
  18.  
  19.     rs.MoveFirst
  20.  
  21. LoopItems:
  22.     ETC....
  23.  
Oct 14 '06 #3
MMcCarthy
14,534 Expert Mod 8TB
I can't see any reason for your problem.

Msgboxes shouldn't lose focus. Make sure the users aren't doing anything strange.
Oct 14 '06 #4
jimatqsi
1,271 Expert 1GB
The focus remains with the form that has the button being pushed, the event that leads to the message box being displayed. I wonder if this problem could be caused by what is going on in other objects on that form.

There are some text boxes with calculations and values from outside the form itself, likes quantity on hand for each item on the order form, that sort of thing ... so if somebody else ships another order with one of those items on it, the form should be updated because of that ... I'll try some things pertaining to that.

Thanks for your comments.

Jim
Oct 14 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: GIMME | last post by:
Background ... I've created a web application that allows a user to create an HTML application from IE. The application itself creates an XML representation of a XHTML form. The XHTML...
19
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the...
7
by: Mark | last post by:
Hi All, I have a report which is based on a query which is used to produce QC check sheets. I have quite a few text boxes which are used to display questions depending on the value of one...
6
by: Tempy | last post by:
Good morning, I have 5 combo boxes that i need to hide when a text box has a certain name in it. I have tried the following, which works, but i have to select the box for it to work. I want the...
2
by: | last post by:
I have a page where I have 3 combo boxes listed in a column. sort of like: combo1 combo2 combo3 Based on which one is clicked, the others are supposed to hide (i.e. combobox.visible =...
34
by: kpg | last post by:
Hello all, I have an asp.net web application with tons of Java script files. I would like to protect the Java Script somehow so it can't be seen by a remote user. I found several 3rd party...
1
by: Glarb Shattenstein | last post by:
I am posting data to one form (integers mostly) with variables dimensioned at the modular level (i.e. mdecTotal as Integer) and have calculations performed on those variables in another form. The...
59
by: Rico | last post by:
Hello, I have an application that I'm converting to Access 2003 and SQL Server 2005 Express. The application uses extensive use of DAO and the SEEK method on indexes. I'm having an issue when...
6
by: YASER WAHEED | last post by:
I have found few days ago that .NET dll can be reversed to view all source code. I have used Dotfuscator but it only renames variables etc. I want to hide code. Please reply with some...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.