PC Review


Reply
Thread Tools Rate Thread

Macro to open subform

 
 
Chey
Guest
Posts: n/a
 
      6th Feb 2009
I have a subform on the main form. I want to click the command button and the
form is visable. I can not remember the macro

My subform name is training providers.

Thanks
 
Reply With Quote
 
 
 
 
Steve Schapel
Guest
Posts: n/a
 
      6th Feb 2009
Chey,

You can use a SetValue action or a SetProperty action to set the Visible
property of the subform to Yes or No as required.

--
Steve Schapel, Microsoft Access MVP

"Chey" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have a subform on the main form. I want to click the command button and
> the
> form is visable. I can not remember the macro
>
> My subform name is training providers.
>
> Thanks


 
Reply With Quote
 
 
 
 
Chey
Guest
Posts: n/a
 
      6th Feb 2009
I don't understand. I created a macro and did setvalue, then under item I put
the form name. What do I do under expression.
Right now I have the forms property set to visable no. So when I click the
command button, it should become visable.

Thanks

"Steve Schapel" wrote:

> Chey,
>
> You can use a SetValue action or a SetProperty action to set the Visible
> property of the subform to Yes or No as required.
>
> --
> Steve Schapel, Microsoft Access MVP
>
> "Chey" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I have a subform on the main form. I want to click the command button and
> > the
> > form is visable. I can not remember the macro
> >
> > My subform name is training providers.
> >
> > Thanks

>

 
Reply With Quote
 
Steve Schapel
Guest
Posts: n/a
 
      6th Feb 2009
Chey,

The command button is on the main form, right? And you want to show the
subform, right?

If so, your macro will be like this...

Action: SetValue
Item: [NameOfYourSubform].[Visible]
Expression: Yes

--
Steve Schapel, Microsoft Access MVP

"Chey" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I don't understand. I created a macro and did setvalue, then under item I
> put
> the form name. What do I do under expression.
> Right now I have the forms property set to visable no. So when I click the
> command button, it should become visable.
>



 
Reply With Quote
 
Chey
Guest
Posts: n/a
 
      7th Feb 2009
I am now getting an error message. The object your referene in the visual
basic editor as an OLE object....

Any suggestions on what went wrong?

Thanks

"Steve Schapel" wrote:

> Chey,
>
> The command button is on the main form, right? And you want to show the
> subform, right?
>
> If so, your macro will be like this...
>
> Action: SetValue
> Item: [NameOfYourSubform].[Visible]
> Expression: Yes
>
> --
> Steve Schapel, Microsoft Access MVP
>
> "Chey" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I don't understand. I created a macro and did setvalue, then under item I
> > put
> > the form name. What do I do under expression.
> > Right now I have the forms property set to visable no. So when I click the
> > command button, it should become visable.
> >

>
>

 
Reply With Quote
 
Chey
Guest
Posts: n/a
 
      7th Feb 2009
I am now getting an error message. The object your reference in the visual
basic editor as on OLE object...

Any suggestions on where I went wrong?

Thanks.

"Steve Schapel" wrote:

> Chey,
>
> The command button is on the main form, right? And you want to show the
> subform, right?
>
> If so, your macro will be like this...
>
> Action: SetValue
> Item: [NameOfYourSubform].[Visible]
> Expression: Yes
>
> --
> Steve Schapel, Microsoft Access MVP
>
> "Chey" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I don't understand. I created a macro and did setvalue, then under item I
> > put
> > the form name. What do I do under expression.
> > Right now I have the forms property set to visable no. So when I click the
> > command button, it should become visable.
> >

>
>

 
Reply With Quote
 
Steve Schapel
Guest
Posts: n/a
 
      7th Feb 2009
Chey,

Can you confirm that the command button is on the main/parent form, i.e. the
same form that contains the subform?

Can you also confirm that the macro is on the Click event of the command
button? And that you get this error message when you click the command
button?

It is possible for the name of the subform control on the main form to have
a name that is different from the name of the actual form that is used as
the subform. Can you please check that.

Can you give full details of the macro, exactly as you have it at the moment
please?

In addition to what you have already told us, is there any other information
shown in the error message?

--
Steve Schapel, Microsoft Access MVP

"Chey" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I am now getting an error message. The object your referene in the visual
> basic editor as an OLE object....
>
> Any suggestions on what went wrong?



 
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
subform combo to filter based on other subform...technically mainform's other subform records. nospam@thankyou.com Microsoft Access 0 15th Sep 2006 07:51 PM
Referencing control in subform from subform's subform Kat Microsoft Access VBA Modules 5 19th Jun 2006 04:03 PM
Wierd subform behaviour, subform not cycling through after updating a subform record Mikal Microsoft Access Forms 2 25th May 2006 07:15 PM
Urgent !!! - Values from Subform - #Error if no records in Subform and Only grabs first subform record Greg Microsoft Access Forms 0 17th Feb 2005 02:12 PM
subform, subform, subform Random Microsoft Access Getting Started 0 1st Oct 2004 12:42 AM


Features
 

Advertising
 

Newsgroups
 


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