TY Crystal and Patrick.....worked like a charm :)
terence
--- In MS_Access_Professionals@yahoogroups.com, Crystal <strive4peace2008@...> wrote:
>
> Hi Terence,
>
> use the report OPEN event. This event, btw, can be canceled, which is nice if there is no data.
>
> Warm Regards,
> Crystal
>
> *
> (: have an awesome day :)
> *
>
>
>
> ________________________________
> From: Terence
>
> Thanx Patrick, I am close , but not 100%.
> in the report On_load event i placed
>
> Me.RecordSource = Forms!frm_roster.mysql
>
> It works, problem is I cannot print the report because i get the error msg 2129 saying i cannot change the recordsource after a report is started or in preview.
>
> I tried to move the code to change rs into the form, but that didn't work either??? Hmm
>
> I will keep experimenting...Suggestions ?
> Terence
>
> --- "patrickawood" <pwood57@> wrote:
> >
> > Hi Terence,
> >
> > I think a Report is a good solution. You can easily change the RecordSource of a report with code.
> >
> > strSQL = "Your Query SQL or Query or Table name here"
> >
> > Reports!MyReport.RecordSource = strSQL
> > Reports!MyReport.Requery
> >
> > Or if you place the code in the Report:
> >
> > Me.RecordSource = strSQL
> > Me.Requery
> >
> > Kind Regards,
> > Patrick Wood
> > Microsoft Access MVP
> > Gaining Access Technologies Founder
> > http://gainingaccess.net
> > Microsoft Access and SQL Azure Information Center for Developers:
> > http://gainingaccess.net/SQLAzure/AccessAndSQLAzureInfo.aspx
> >
> >
> > --- "Terence" <buffalome90210@> wrote:
> > >
> > > I have a form with a listbox.
> > > The listbox gets populated dynamically, I change it's source, for things like sort options, and criteria between dates.
> > >
> > > I can't use a screen print because the box content may be larger then visible, i.e. vertical scroll bar.
> > >
> > > only thing i can think of is a generic report and change its source, but I am not sure how to change the recordsource dynamically for a report....
> > >
> > > suggestions on how to print this listbox, and/or how to change RS of the report ?
> > > terence
> > >
> >
>
> [Non-text portions of this message have been removed]
>
Senin, 02 Januari 2012
[MS_AccessPros] Re: Print a listbox from a form, the list box is dynamic
__._,_.___
MARKETPLACE
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar