|
|
|
date: Mon, 29 Sep 2008 09:52:05 -0700,
group: microsoft.public.access.formscoding
back
RE: Use of RecordSet
Try:
DoCmd.SetWarnings False
DoCmd.OpenQuery strDoc, acNormal, acEdit
DoCmd.OpenForm strDoc1, acNormal
me.recordsource=""
Me.RecordSource = "qryProductGrpPads"
DoCmd.SetWarnings True
hth
--
Maurice Ausum
"NEWER USER" wrote:
> I am having some difficulty geeting the RecordSet property to work. I am
> trying to use ONE form to display records differently rather than creating
> separate forms and subforms. My form is titled frmGrouping and has its
> RecordSet as qryGrouping. I want to change the Recordset to
> "qryProductGrpPads" when the form opens. The only difference in the two
> queries is one table that I build prior to opening the form. I have the
> following code attached to a Command button on a Form used to call the form.
>
> On Error GoTo Err_Alternates_Click
> Dim strDoc As String
> Dim strDoc1 As String
> Dim strDoc2 As String
>
> strDoc = "qryMakeTableGrpPads"
> strDoc1 = "frmGrouping"
> strDoc2 = "qryProductGrpPads"
>
> DoCmd.SetWarnings False
> DoCmd.OpenQuery strDoc, acNormal, acEdit
> DoCmd.OpenForm strDoc1, acNormal, "", "", , acNormal
> Me.RecordSource = strDoc2
> DoCmd.SetWarnings True
>
> Exit_Alternates_Click:
> Exit Sub
>
> Err_Alternates_Click:
> MsgBox Err.Description
> Resume Exit_Alternates_Click
>
> The form is opening BLANK; The Recordset is not substituing in place of the
> one defined in the form properties. Any help appreciated.
date: Mon, 29 Sep 2008 14:09:01 -0700
author: Maurice
RE: Use of RecordSet
Same Result - Blank Form-no records
"Maurice" wrote:
> Try:
>
> DoCmd.SetWarnings False
> DoCmd.OpenQuery strDoc, acNormal, acEdit
> DoCmd.OpenForm strDoc1, acNormal
> me.recordsource=""
> Me.RecordSource = "qryProductGrpPads"
> DoCmd.SetWarnings True
>
>
> hth
> --
> Maurice Ausum
>
>
> "NEWER USER" wrote:
>
> > I am having some difficulty geeting the RecordSet property to work. I am
> > trying to use ONE form to display records differently rather than creating
> > separate forms and subforms. My form is titled frmGrouping and has its
> > RecordSet as qryGrouping. I want to change the Recordset to
> > "qryProductGrpPads" when the form opens. The only difference in the two
> > queries is one table that I build prior to opening the form. I have the
> > following code attached to a Command button on a Form used to call the form.
> >
> > On Error GoTo Err_Alternates_Click
> > Dim strDoc As String
> > Dim strDoc1 As String
> > Dim strDoc2 As String
> >
> > strDoc = "qryMakeTableGrpPads"
> > strDoc1 = "frmGrouping"
> > strDoc2 = "qryProductGrpPads"
> >
> > DoCmd.SetWarnings False
> > DoCmd.OpenQuery strDoc, acNormal, acEdit
> > DoCmd.OpenForm strDoc1, acNormal, "", "", , acNormal
> > Me.RecordSource = strDoc2
> > DoCmd.SetWarnings True
> >
> > Exit_Alternates_Click:
> > Exit Sub
> >
> > Err_Alternates_Click:
> > MsgBox Err.Description
> > Resume Exit_Alternates_Click
> >
> > The form is opening BLANK; The Recordset is not substituing in place of the
> > one defined in the form properties. Any help appreciated.
date: Mon, 29 Sep 2008 15:04:01 -0700
author: NEWER USER
|
|