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

Home Posts Topics Members FAQ

Action after closing a table

Hi All,
My database has a macro which opens up a table. A text file is then
pasted into the table and the then closed manually. Once closed, I then have
another macro which runs certain queries to append it to another table. Is
there a way to set a condition (as you can with a form) so that when the
table is closed, the macro runs?

I have no idea about VB so any suggestions with reference to VB will need to
be very specific!!!

Many thanks in advance,

Mark
Nov 12 '05 #1
2 7402
On Mon, 2 Feb 2004 09:07:30 -0000, "Mark Reed" <ma*********@ntlworld.com>
wrote:
Hi All,
My database has a macro which opens up a table. A text file is then
pasted into the table and the then closed manually. Once closed, I then have
another macro which runs certain queries to append it to another table. Is
there a way to set a condition (as you can with a form) so that when the
table is closed, the macro runs?

I have no idea about VB so any suggestions with reference to VB will need to
be very specific!!!

Many thanks in advance,

Mark


Well, VB is not so hard, and macros are very limited. I think, if you take
the plunge, you'll find that VB is actually easier to write, read and
maintain, and far more flexible. I know you wanted specifics, but I don;t
have time to give them to you here. There are many great books on the
subject, and/or you can find good code examples on-line.

Next, in any Access application, you pretty much want to open forms, not
tables. You can have the form look just like the table by opening it in
Datasheet view. If you also open it in Dialog mode, the code that opened it
will wait until you close the form to continue on to the next statement,
but...

There are times when it is appropriate to open a form in Dialog mode, but in
most cases, it's better to have an action on the form itself initiate the next
action instead. This would even be true if you decide not to use VB for this
at all, but stick with macros.

So, create an unbound form (one with no Record Source), and create another
form bound to your table, and set its properties so it opens in Datasheet
view. Now, add the new form as a subform of the first (parent) form.
Finally, on the parent form, add a button that closes the form, and runs the
code or macro that performs the next step. This is event-driven vs linear
coding style, and it's how Access was designed to work.
Nov 12 '05 #2
It's so weird how the simplest of things impress the most!!!!

Fantastic, exactly what I wanted. I have been thinking of "Taking the
plunge" to learn VB for a while now and think that I may just do that.
Thanks again for your help, much appreciated.

Mark

"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:sc********************************@4ax.com...
On Mon, 2 Feb 2004 09:07:30 -0000, "Mark Reed" <ma*********@ntlworld.com>
wrote:
Hi All,
My database has a macro which opens up a table. A text file is then
pasted into the table and the then closed manually. Once closed, I then haveanother macro which runs certain queries to append it to another table. Isthere a way to set a condition (as you can with a form) so that when the
table is closed, the macro runs?

I have no idea about VB so any suggestions with reference to VB will need tobe very specific!!!

Many thanks in advance,

Mark

Well, VB is not so hard, and macros are very limited. I think, if you

take the plunge, you'll find that VB is actually easier to write, read and
maintain, and far more flexible. I know you wanted specifics, but I don;t
have time to give them to you here. There are many great books on the
subject, and/or you can find good code examples on-line.

Next, in any Access application, you pretty much want to open forms, not
tables. You can have the form look just like the table by opening it in
Datasheet view. If you also open it in Dialog mode, the code that opened it will wait until you close the form to continue on to the next statement,
but...

There are times when it is appropriate to open a form in Dialog mode, but in most cases, it's better to have an action on the form itself initiate the next action instead. This would even be true if you decide not to use VB for this at all, but stick with macros.

So, create an unbound form (one with no Record Source), and create another
form bound to your table, and set its properties so it opens in Datasheet
view. Now, add the new form as a subform of the first (parent) form.
Finally, on the parent form, add a button that closes the form, and runs the code or macro that performs the next step. This is event-driven vs linear
coding style, and it's how Access was designed to work.

Nov 12 '05 #3

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

Similar topics

1
by: Michael Brennan-White | last post by:
If I submit my for using a get action the resulting page loads . If I use a post action I get an error page saying "The page cannot be found". I am calling the originating page!!! This happens...
2
by: Sugapablo | last post by:
Is there a way where an end user can download multiple files with one click? I have a database table that can return between 1 and 12 different filenames (JPGs). I'd like to have a single...
2
by: kma | last post by:
I am designing an Access 2000 database on a computer running Windows 98. I have one form with several tabs; all of which have sub forms, some with a subform on a subform. For example, on my...
6
by: MLH | last post by:
I've followed the instructions found on Microsoft's site... http://support.microsoft.com/default.aspx?scid=kb;en-us;149119&Product=acc97 Here are those instructions... To play and record...
5
by: deko | last post by:
How to run action query against linked table? I have an Access 2003 mdb with an Excel 2003 Workbook as a linked table. When I attempt to run an action query against the linked table I get this...
5
by: HS Hartkamp | last post by:
Hi all, I am working with fairly large databases (> 500 Mb / < 2,000,000 rexcords), and often need to do action queries on these. I have the feeling that much of the computing power is going...
1
by: S. David Kyle | last post by:
I am having a weird issue when I generate an input Html tag from a Xsl transformation. When the trasform is executed on the xsl below, the <inputtag has the closing slash removed in the first...
3
oll3i
by: oll3i | last post by:
package zad41; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.*; import java.net.*; import javax.swing.BorderFactory;
4
by: since | last post by:
How do I in IE prevent the onclick action from being fired when I am done dragging? have tried "window.event.cancelBubble = true", for onmouseup , onmousedown, and onmousemove handlers. The onclick...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
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: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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.