Pausing Macro to Allow User to Enter Data (1 Viewer)

Chrish

New member
Local time
Today, 09:45
Joined
Aug 22, 2012
Messages
9
Access 2010
I have a macro that opens a table, clears the data and invites the user to paste in new data. The user then closes this table and clicks on a second macro from the ribbon to update this data to various locations.

What I would like to be able to do is have the user click on the first macro to open and clear the table, input the data and then on closing the table the second macro runs automatically.

Any help on this would be very appreciated as my current searches on the web have proved fruitless.

Many thanks

Chris
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 09:45
Joined
Jul 9, 2003
Messages
16,280
First of all you should not let your users enter data directly into the table.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 09:45
Joined
Jul 9, 2003
Messages
16,280
Off the top of my head I can't think of any way to detect when a user has finished what they are doing?
 

vbaInet

AWF VIP
Local time
Today, 09:45
Joined
Jan 22, 2010
Messages
26,374
What I would like to be able to do is have the user click on the first macro to open and clear the table, input the data and then on closing the table the second macro runs automatically.
This is a bit worrying. Can you expand on this?

@Uncle Gizmo, don't worry, I'm not following you :)
 

Chrish

New member
Local time
Today, 09:45
Joined
Aug 22, 2012
Messages
9
The table in question is a seperate 'import' table which can not break anything within the system.

The user finishes their import by closing the table and it is on close of the table that I would like the second macro to run.
 

vbaInet

AWF VIP
Local time
Today, 09:45
Joined
Jan 22, 2010
Messages
26,374
Alright, that clears that up. And this table is local temp table?

What you need to do is:
1. Run a Delete query to clear the table
2. Open a form that's bound to the table. Open it as a Datasheet
3. In the Close event of the form, run the second macro/code
 

Chrish

New member
Local time
Today, 09:45
Joined
Aug 22, 2012
Messages
9
Alright, that clears that up. And this table is local temp table?

What you need to do is:
1. Run a Delete query to clear the table
2. Open a form that's bound to the table. Open it as a Datasheet
3. In the Close event of the form, run the second macro/code

Yes, a temp table only.

Simple, if only I'd thought of that!!!:banghead: Funny how when you look at something for so long, you can't see the simple things.:rolleyes:

Many thanks, now to finish lunch and then try it.
 

Users who are viewing this thread

Top Bottom