Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Waiting for a response

Posted on 2000-03-17
5
Medium Priority
?
143 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 400 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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 Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

718 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