WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

How To Change Form RecordSet

 
   Home -> Office other -> General Discussions RSS
Next:  How To Determine Database Home Directory  
Author Message
Duck

External


Since: Apr 04, 2008
Posts: 23



(Msg. 1) Posted: Fri Jul 04, 2008 6:18 am
Post subject: How To Change Form RecordSet
Archived from groups: microsoft>public>access (more info?)

I have a form that is used to display patient records. It's default
Recordset is set to a query which shows only current clients. I want
to use an option box on the form to force the form to use the client
table (tblClients) as it's source Recordset, which would display ALL
clients (past and present), not just current clients. How do I
accomplish this?
Back to top
Login to vote
scubadiver

External


Since: May 05, 2006
Posts: 790



(Msg. 2) Posted: Fri Jul 04, 2008 6:32 am
Post subject: RE: How To Change Form RecordSet [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In the 'onclick' event of the option box I would probably try something like

if me.checkbox.value = -1 then me.Form.Recordset = "tblclients"

"Duck" wrote:

> I have a form that is used to display patient records. It's default
> Recordset is set to a query which shows only current clients. I want
> to use an option box on the form to force the form to use the client
> table (tblClients) as it's source Recordset, which would display ALL
> clients (past and present), not just current clients. How do I
> accomplish this?
>
>
>
>
Back to top
Login to vote
Duck

External


Since: Apr 04, 2008
Posts: 23



(Msg. 3) Posted: Fri Jul 04, 2008 7:09 am
Post subject: Re: How To Change Form RecordSet [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Jul 4, 6:32 am, scubadiver <scubadi....DeleteThis@discussions.microsoft.com>
wrote:
> In the 'onclick' event of the option box I would probably try something like
>
> if me.checkbox.value = -1 then me.Form.Recordset = "tblclients"
>
>
>
> "Duck" wrote:
> > I have a form that is used to display patient records.  It's default
> > Recordset is set to a query which shows only current clients.  I want
> > to use an option box on the form to force the form to use the client
> > table (tblClients) as it's source Recordset, which would display ALL
> > clients (past and present), not just current clients.  How do I
> > accomplish this?- Hide quoted text -
>
> - Show quoted text -

I tried that already and would get "Operation is not supported for
this type of object" error My code is:

If Me.optAllOrCurrent.Value = 1 Then
Me.Form.Recordset = "qryCurrentClients"
Else
Me.Form.Recordset = "qryCurrentClientsAll"
End If

The optionbox can have a value of either 1 (default) or 2
Back to top
Login to vote
aaron.kempf

External


Since: Apr 09, 2008
Posts: 572



(Msg. 4) Posted: Fri Jul 04, 2008 8:17 am
Post subject: Re: How To Change Form RecordSet [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

you want to be using RecordSOURCE not recordSET





On Jul 4, 7:09 am, Duck <charles.kendri....RemoveThis@charter.net> wrote:
> On Jul 4, 6:32 am, scubadiver <scubadi....RemoveThis@discussions.microsoft.com>
> wrote:
>
> > In the 'onclick' event of the option box I would probably try something like
>
> > if me.checkbox.value = -1 then me.Form.Recordset = "tblclients"
>
> > "Duck" wrote:
> > > I have a form that is used to display patient records.  It's default
> > > Recordset is set to a query which shows only current clients.  I want
> > > to use an option box on the form to force the form to use the client
> > > table (tblClients) as it's source Recordset, which would display ALL
> > > clients (past and present), not just current clients.  How do I
> > > accomplish this?- Hide quoted text -
>
> > - Show quoted text -
>
> I tried that already and would get "Operation is not supported for
> this type of object" error  My code is:
>
> If Me.optAllOrCurrent.Value = 1 Then
>     Me.Form.Recordset = "qryCurrentClients"
> Else
>     Me.Form.Recordset = "qryCurrentClientsAll"
> End If
>
> The optionbox can have a value of either 1 (default) or 2
Back to top
Login to vote
Duck

External


Since: Apr 04, 2008
Posts: 23



(Msg. 5) Posted: Fri Jul 04, 2008 8:47 am
Post subject: Re: How To Change Form RecordSet [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Jul 4, 8:17 am, "a a r o n . k e m p f @ g m a i l . c o m"
<aaron.ke....DeleteThis@gmail.com> wrote:
> you want to be using RecordSOURCE not recordSET
>
> On Jul 4, 7:09 am, Duck <charles.kendri....DeleteThis@charter.net> wrote:
>
>
>
> > On Jul 4, 6:32 am, scubadiver <scubadi....DeleteThis@discussions.microsoft.com>
> > wrote:
>
> > > In the 'onclick' event of the option box I would probably try something like
>
> > > if me.checkbox.value = -1 then me.Form.Recordset = "tblclients"
>
> > > "Duck" wrote:
> > > > I have a form that is used to display patient records.  It's default
> > > > Recordset is set to a query which shows only current clients.  I want
> > > > to use an option box on the form to force the form to use the client
> > > > table (tblClients) as it's source Recordset, which would display ALL
> > > > clients (past and present), not just current clients.  How do I
> > > > accomplish this?- Hide quoted text -
>
> > > - Show quoted text -
>
> > I tried that already and would get "Operation is not supported for
> > this type of object" error  My code is:
>
> > If Me.optAllOrCurrent.Value = 1 Then
> >     Me.Form.Recordset = "qryCurrentClients"
> > Else
> >     Me.Form.Recordset = "qryCurrentClientsAll"
> > End If
>
> > The optionbox can have a value of either 1 (default) or 2- Hide quoted text -
>
> - Show quoted text -

Using RecordSource instead of RecordSet solved the problem...Thank you
all very much
Back to top
Login to vote
Display posts from previous:   
       Home -> Office other -> General Discussions All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
 Office
  Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET