Solved

Waiting for a response

Posted on 2000-03-17
5
141 Views
Last Modified: 2010-05-02
My next problem. I have a loop that processes data file. When I find a "bad" record I want to put that data in a grid, allow for editing it and have the user click a button to accept or reject the edits. The grid and buttons are hidden on the form until I am ready for the user. Problem is, I populate the grid and then my program goes along and processes the rest of the data. How can I have the process wait for one of the buttons on the form to be pressed and then keep going?  All of the unhiding and populating is happening in a sub called FixData
0
Comment
Question by:scotts27
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 14

Accepted Solution

by:
mcrider earned 100 total points
ID: 2628525
Well, you could pull the grid and buttons out of your current form and put them on another form.

Then when you run into a bad record, populate the grid on this new form and show it like this:

    NewForm.Show 1

That way, your processing will stop until the user edits the item and clicks a button...  The button they click needs to hide the newform so processing can continue...


Cheers!®©
0
 
LVL 9

Expert Comment

by:Dalin
ID: 2628624
or you can do something like:
'code for process data
'Somekind of loop
  ' If data problem
 'Put it in grid
' Show the grid and botton
      Do while GridControl (or Botton).Visiable = True
                   DoEvents
            Loop
    ' continue to process  
'end of loop.

However, mcrider's suggestion is a cleaner way of doing it, unless you have something else going on at the sametime
0
 

Expert Comment

by:rnshaw
ID: 2628638
Well looks like i read this one too late, hehe. The above answers are both exactly what you would do. I would recommend #1 if you dont need to go away from that form, but #2 allows you to open a different form, since adding the 1 after the .show causes the form to become modal.
0
 

Author Comment

by:scotts27
ID: 2628720
Thanks! Once again, I was on the right track but had no idea about the 1 on the end to make it modal.. Perefect.
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2628792
Yea, you can use the 1 to make it modal, or you can use the keyword VbModal, which is equal to 1.

Thanks for the points! Glad I could help!


Cheers!®©
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question