473,473 Members | 1,549 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Pausing between forms

I am using Access 97. I would like to be able to pause between forms.

For example, I have 2 reminders I would like displayed separately, one
at a time. Here is part of the code I am using.

If Not rstReminders.EOF Then
rstReminders.MoveFirst
While Not rstReminders.EOF
strReminder = rstReminders!Reminder
strEventCaption = rstReminders!EventCaption

DoCmd.OpenForm "frmMessage"
Forms!frmMessage.Caption = strEventCaption
Forms!frmMessage!txtReminder = strReminder

rstReminders.MoveNext
Wend
End If

Making the form a Dialog form by adding acDialog does not work because
then I cannot set the Message Caption or the reminder.

I also tried adding DoEvents and Wait (found on Microsoft's site) to no
avail. I know that I can insert a MsgBox statement to halt the code
until the user clicks on okay but I want it to halt and have the user
click on the OK button of the frmMessage.

Does anyone have any suggestions? Thank you,
Deborah

Nov 12 '05 #1
2 1303
Deborah V. Gardner wrote:
I am using Access 97. I would like to be able to pause between forms.

For example, I have 2 reminders I would like displayed separately, one
at a time. Here is part of the code I am using.

If Not rstReminders.EOF Then
rstReminders.MoveFirst
While Not rstReminders.EOF
strReminder = rstReminders!Reminder
strEventCaption = rstReminders!EventCaption

DoCmd.OpenForm "frmMessage"
Forms!frmMessage.Caption = strEventCaption
Forms!frmMessage!txtReminder = strReminder

rstReminders.MoveNext
Wend
End If

Making the form a Dialog form by adding acDialog does not work because
then I cannot set the Message Caption or the reminder.

I also tried adding DoEvents and Wait (found on Microsoft's site) to
no avail. I know that I can insert a MsgBox statement to halt the code
until the user clicks on okay but I want it to halt and have the user
click on the OK button of the frmMessage.

Does anyone have any suggestions? Thank you,
Deborah

In the form that runs this code, change it to see if there are are
records in rstReminder. If there are,
open the frmMessage form and have it loop thru the reminder file
displaying the reminders. Use a
click button to have the loop go to the next record. When completed,
close the frmMessage form.

Ron
--

Ronald W. Roberts
Roberts Communication
rw*******************@robcom.com
To reply remove "_at_robcom_dot_com"

Nov 12 '05 #2
On Sun, 22 Feb 2004 04:44:15 GMT, Deborah V. Gardner wrote:
I am using Access 97. I would like to be able to pause between forms.

For example, I have 2 reminders I would like displayed separately, one
at a time. Here is part of the code I am using.

If Not rstReminders.EOF Then
rstReminders.MoveFirst
While Not rstReminders.EOF
strReminder = rstReminders!Reminder
strEventCaption = rstReminders!EventCaption

DoCmd.OpenForm "frmMessage"
Forms!frmMessage.Caption = strEventCaption
Forms!frmMessage!txtReminder = strReminder

rstReminders.MoveNext
Wend
End If

Making the form a Dialog form by adding acDialog does not work because
then I cannot set the Message Caption or the reminder.

I also tried adding DoEvents and Wait (found on Microsoft's site) to no
avail. I know that I can insert a MsgBox statement to halt the code
until the user clicks on okay but I want it to halt and have the user
click on the OK button of the frmMessage.

Does anyone have any suggestions? Thank you,
Deborah


You can use acDialog to open the form, but you'll need to pass your caption
and message before you open the form. A quick and simple way is to delcare
strReminder and strEventCaption as public to the project, then just open
the form as acDialog. In the Open event of the message form, use those
public variables to set the caption and message.

A better, but slighlty more complicated way is to pass strReminder and
strEventCaption as the OpenArgs setting of the DoCmd.OpenForm. You'll need
to format them in a way that you can use InStr() to extract them reliably

--
Mike Storr
www.veraccess.com
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Dr. Know | last post by:
I am working on an ASP page that writes to several databases, ranging from MDBs to x-base. One of the tasks involves using an existing highest value from the DB and incrementing it before...
3
by: Lloyd Sheen | last post by:
I have the following situation: Need a user resizable user control. After much trying with user control I came across the idea of hosting the controls in a form marked as not TopLevel = false. ...
7
by: Charles Law | last post by:
My first thought was to call WorkerThread.Suspend but the help cautions against this (for good reason) because the caller has no control over where the thread actually stops, and it might have...
4
by: RSH | last post by:
I am writing a VB .Net App (Not ASP .Net) where I'm having an issue creating a cancel button... I have a situation where I have a loop that is initiated when the user clicks on a Run button. ...
2
by: BLUE | last post by:
I would like to pause an application while the GUI display a Label saying "Logging in...". System.Timers System.Windows.Forms.Timer System.Threading.Timer System.Threading ==Thread.Sleep ...
0
by: Grayzag | last post by:
Hi there, As part of my Software course, i have to create a game. Since I originally started out with python, I was used to it being really easy to create a main loop to control the game with a...
12
by: greg | last post by:
Hi, Can anyone help me with the following issue: How can I pause the execution of a program until a given file is created (by another process) in a specified directory? Any ideas would be...
3
by: Lucress Carol | last post by:
Hi everyone, I'm having troubles with pausing and continuing MFC Thread.For test purposes I've created in my MFC Dialog application a progress Bar Control, a Start Button and a Stop Button.The...
0
by: thesti | last post by:
hello, i have some jbuttons in my frame. and i have a recursive method, which will check a certain condition and if satisfied, will move one of the jbuttons location to somewhere else in the...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.