PC Review


Reply
Thread Tools Rate Thread

Access Macro Help Please!

 
 
=?Utf-8?B?U2tpaW55X2pk?=
Guest
Posts: n/a
 
      1st Mar 2005
Hi I have a query that runs and opens a form. The query returns many records
so I have to scroll through till I find the record I'm looking for. I then
have a button that takes the data from the form and runs and uses it to run
an append query. The query data and more is saved to the database and opens a
form with all of the info on it. the form also has some questions that can be
answered. The problem is I can seem to find a way to get the second form to
open up on the record from the first form, right now it opens fine but not on
the record you just selected from the first form. Any ides, I have had no
luck with gotorecord

This is what I have in my macro sorry should have posted earlier

stDocName = "Add ZZZZ Completion Querie"
DoCmd.OpenQuery stDocName, acNormal, acEdit runs append query using data in
first form

stDocName = "Add ZZZZ Completion Form"
DoCmd.OpenForm stDocName

The last part opens form with queried data but not on correct data that was
in the first form
 
Reply With Quote
 
 
 
 
Jeff Boyce
Guest
Posts: n/a
 
      2nd Mar 2005
Not sure if this will help, but take a look at the syntax of the OpenForm
command. There should be a parameter for Open Arguments, which would allow
you to "pass" a value to the form.

There should also be a parameter for a Filter, and for a WHERE clause, to
help a particular record or set of records be loaded with the form.

--
Good luck

Jeff Boyce
<Access MVP>

"Skiiny_jd" <(E-Mail Removed)> wrote in message
news:CC42981D-5BFB-4CCF-940D-(E-Mail Removed)...
> Hi I have a query that runs and opens a form. The query returns many

records
> so I have to scroll through till I find the record I'm looking for. I then
> have a button that takes the data from the form and runs and uses it to

run
> an append query. The query data and more is saved to the database and

opens a
> form with all of the info on it. the form also has some questions that can

be
> answered. The problem is I can seem to find a way to get the second form

to
> open up on the record from the first form, right now it opens fine but not

on
> the record you just selected from the first form. Any ides, I have had no
> luck with gotorecord
>
> This is what I have in my macro sorry should have posted earlier
>
> stDocName = "Add ZZZZ Completion Querie"
> DoCmd.OpenQuery stDocName, acNormal, acEdit runs append query using data

in
> first form
>
> stDocName = "Add ZZZZ Completion Form"
> DoCmd.OpenForm stDocName
>
> The last part opens form with queried data but not on correct data that

was
> in the first form


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running excel macro from an Access Macro Matt Microsoft Access VBA Modules 3 25th Mar 2008 04:05 PM
Macro to run an Existing Microsoft Access Macro =?Utf-8?B?UGF1bCBEZW5uaXM=?= Microsoft Excel Programming 1 6th Nov 2007 02:48 PM
what macro action has replace the setvalue macro in Access 2007 =?Utf-8?B?TWFjcm8gaW4gQWNjZXNzIDIwMDc=?= Microsoft Access Macros 2 21st Feb 2007 05:00 PM
Can I write a macro in Excel that runs a macro from Access DB =?Utf-8?B?VGltbXk=?= Microsoft Access Form Coding 5 3rd Dec 2005 10:39 AM
Launch Macro in Access via Macro running in Excel??? dgrant Microsoft Excel Programming 1 24th Sep 2003 01:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:42 PM.