15183 Opening a form from within a subform using a macro
Sign Up |  Live StatsLive Stats    Articles 37,335| Comments 177,302| Members 19,419, Newest Nahluwalia| Online 521
Home Contact
 (Forgotten?): 
    Sikhism
    For best SPN experience, use Firefox Internet Browser!


                                                                   Your Banner Here!    




Click Here to Register/Sign Up Daily Hukamnama Member Blogs Downloads Website Navigation Help Fonts Tags
Sikh Philosophy Network » Sikh Philosophy Network » Current News » Information Technology » Opening a form from within a subform using a macro

Opening a form from within a subform using a macro

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 500 USD, Received: 115 USD (23%)
Please Donate...
     
Related Topics...
Thread Thread Starter Forum Replies Last Post
Opening a form showing only some data MartinR Information Technology 2 28-Jul-2006 08:41 AM
Help opening up query into form mwest Information Technology 1 28-Jul-2006 08:37 AM
Switchboard form is opening but immediately gets minimized tsison7 Information Technology 3 28-Jul-2006 08:26 AM
macro/subform event Nathan Information Technology 2 28-Jul-2006 08:21 AM
Cancelling the opening of a form? Maury Markowitz Information Technology 2 28-Jul-2006 08:00 AM


Tags
opening, form, within, subform, using, macro
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:29 AM
john@leeburn's Avatar john@leeburn
Guest
 
Posts: n/a
   
   
Opening a form from within a subform using a macro

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
I wish to open a form from within a sub form.
Main form - Contact details - ContactID
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/12527-opening-form-within-subform-using-macro.html
Subform - property details - Property ID
Advertising Form to Open contains PropertyID
If the Property form is stand alone, I can create a macro that uses IsLoaded
and Open the Advertising form to the correct Property ID using Where
PropertyID=PropertyID (I have left actual detail out)
This doesn't work at all when the property form is a SubForm.
Is there a way I can get this to work?
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12527

*







Got anything to share on This Topic? Why not share your immediate thoughts/reaction with us! Login Now! or Sign Up Today! to share your views... Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Jul-2006, 08:29 AM
Larry Linson's Avatar Larry Linson
Guest
 
Posts: n/a
   
   
Re: Opening a form from within a subform using a macro


"john@leeburn" wrote in message
news:70CE26AC-65FC-403D-86BB-6558DF9E8EE5@microsoft.com...
>I wish to open a form from within a sub form.
> Main form - Contact details - ContactID
> Subform - property details - Property ID
> Advertising Form to Open contains PropertyID
> If the Property form is stand alone, I can create a macro that uses
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12527
> IsLoaded
> and Open the Advertising form to the correct Property ID using Where
> PropertyID=PropertyID (I have left actual detail out)
> This doesn't work at all when the property form is a SubForm.
> Is there a way I can get this to work?

Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12527

There's nothing to keep you from executing a DoCmd.OpenForm from within the
VBA code of a Form embedded in a Subform Control. "Doesn't work" also
doesn't give us much to go on. Neither does "leaving out the actual detail"
because, almost certainly, "the Devil's in the details."

If you really mean "Access macro" instead of VBA code, then someone else is
going to have to pick up once you give us the details. The only macros I
have used in recent years are AutoExec and AutoKeys.

Larry Linson
Microsoft Access MVP


Reply With Quote
  #3 (permalink)  
Old 28-Jul-2006, 08:32 AM
john@leeburn's Avatar john@leeburn
Guest
 
Posts: n/a
   
   
Re: Opening a form from within a subform using a macro

  Donate Today!  


"Larry Linson" wrote:

>
> "john@leeburn" wrote in message
> news:70CE26AC-65FC-403D-86BB-6558DF9E8EE5@microsoft.com...
> >I wish to open a form from within a sub form.
> > Main form - Contact details - ContactID
> > Subform - property details - Property ID
> > Advertising Form to Open contains PropertyID
> > If the Property form is stand alone, I can create a macro that uses
> > IsLoaded
> > and Open the Advertising form to the correct Property ID using Where
> > PropertyID=PropertyID (I have left actual detail out)
> > This doesn't work at all when the property form is a SubForm.
> > Is there a way I can get this to work?

>
> There's nothing to keep you from executing a DoCmd.OpenForm from within the
> VBA code of a Form embedded in a Subform Control. "Doesn't work" also
> doesn't give us much to go on. Neither does "leaving out the actual detail"
> because, almost certainly, "the Devil's in the details."
>
> If you really mean "Access macro" instead of VBA code, then someone else is
> going to have to pick up once you give us the details. The only macros I
> have used in recent years are AutoExec and AutoKeys.
>
> Larry Linson
> Microsoft Access MVP
>
>
>

OK thanks for replying. Here's some more detail:
I have a contacts form with a subform.
From the Marketing Options subform, I wish to open a report, but only one
record based on the OptionID within the subform. I have a control button that
runs the code below. It works when the form is open on it's own and not
imbheedded in the Contacts Form as a subform. When I use the control button
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12527
in the subform, it calls for me to enter the OptionID .. it then opens the
report with the correct data. I would prefer not to have to enter the
OptionID. So hope this is clearer ... it works just fine on its own but not
when it in the subform.
Cheers and thanks,
John

Private Sub Marketing_Click()
On Error GoTo Err_Marketing_Click

Dim stDocName As String

stDocName = "MarketingOption"
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12527
DoCmd.OpenReport stDocName, acPreview, ApplyFilter, "OptionID =
Forms![MarketingOptions]![OptionID]"

Exit_Marketing_Click:
Exit Sub

Err_Marketing_Click:
MsgBox Err.Description
Resume Exit_Marketing_Click

End Sub
Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
Display Modes

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 On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Active Discussions
How does Sikhi help you...
Today 15:06 PM
36 Replies, 1,029 Views
Request for assistance...
Today 09:34 AM
10 Replies, 136 Views
Occultism - Rejection in...
Today 08:44 AM
62 Replies, 2,664 Views
‘Bigoted’ Facebook...
Today 08:32 AM
1 Replies, 60 Views
Australia mulls allowing...
Today 07:30 AM
0 Replies, 47 Views
Woolwich Killing: The...
Today 06:41 AM
3 Replies, 75 Views
Panjabi
By Ishna
Today 04:40 AM
16 Replies, 314 Views
Rozana Reports (ਪੰਜਾਬੀ...
Today 03:09 AM
316 Replies, 7,651 Views
Sikh Spokesman (ਪੰਜਾਬੀ...
Today 03:00 AM
179 Replies, 4,551 Views
Transgenderism ... Right...
By Kaylee
Today 00:33 AM
25 Replies, 1,274 Views
Losing My Religion: Why...
Today 00:00 AM
14 Replies, 396 Views
Kirtan
Yesterday 21:24 PM
0 Replies, 43 Views
Keeping Amrit Vela
Yesterday 16:49 PM
12 Replies, 942 Views
Do you believe in...
Yesterday 15:08 PM
196 Replies, 4,119 Views
Black Sikhs?
Yesterday 06:33 AM
20 Replies, 5,930 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.3
All times are GMT +6.5. The time now is 16:50 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.90735 seconds with 32 queries
0