Group:  Microsoft Access ยป microsoft.public.access.modulesdaovba.ado
Thread: how can I show the recordset data in a query?

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

how can I show the recordset data in a query?
Jose Perdigao 05.09.2006 12:58:02
I would like to show the data from a recordset in a query.

Is it possible? how can i do?

thanks,
JP
Re: how can I show the recordset data in a query?
"Alex Dybenko" <alexdyb[ at ]PLEASE.cemi.NO.rssi.SPAM.ru> 05.09.2006 17:11:40
Hi,
what do you mean with query? query you can build on table or other query,
recordset you can sort, filter

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

"Jose Perdigao" <JosePerdigao[ at ]discussions.microsoft.com> wrote in message
news:D413C705-343E-4A62-8FE5-5C27012FD1EE[ at ]microsoft.com...
[Quoted Text]
>I would like to show the data from a recordset in a query.
>
> Is it possible? how can i do?
>
> thanks,
> JP

Re: how can I show the recordset data in a query?
Jose Perdigao 05.09.2006 19:46:02
I mean query the term tha we use in ms access.
I'm using ms access 2003 and there you have, tables, queryes, forms, entc.

The question is.

I create a recordset using for example the following code
Dim rec As ADODB.recordset
DIM strSQL as String
Set rec = New ADODB.recordset
strSQL ="SELECT * FROM Customers
rec.Open strSQL, CurrentProject.Connection

-- now I need the code to show the data existing in rec (rec - recordset) in
a query or in a form

What can I do?

Thanks,

JP

"Alex Dybenko" wrote:

[Quoted Text]
> Hi,
> what do you mean with query? query you can build on table or other query,
> recordset you can sort, filter
>
> --
> Best regards,
> ___________
> Alex Dybenko (MVP)
> http://alexdyb.blogspot.com
> http://www.PointLtd.com
>
> "Jose Perdigao" <JosePerdigao[ at ]discussions.microsoft.com> wrote in message
> news:D413C705-343E-4A62-8FE5-5C27012FD1EE[ at ]microsoft.com...
> >I would like to show the data from a recordset in a query.
> >
> > Is it possible? how can i do?
> >
> > thanks,
> > JP
>
>
Re: how can I show the recordset data in a query?
"Alex Dybenko" <alexdyb[ at ]PLEASE.cemi.NO.rssi.SPAM.ru> 06.09.2006 05:15:01
Hi,
then you can create a form, bind this recordset to form and show it. Look at
Recordset Property in Access help for more info

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

"Jose Perdigao" <JosePerdigao[ at ]discussions.microsoft.com> wrote in message
news:6B5A6DE0-780B-4810-B0BE-848404E286E9[ at ]microsoft.com...
[Quoted Text]
>I mean query the term tha we use in ms access.
> I'm using ms access 2003 and there you have, tables, queryes, forms, entc.
>
> The question is.
>
> I create a recordset using for example the following code
> Dim rec As ADODB.recordset
> DIM strSQL as String
> Set rec = New ADODB.recordset
> strSQL ="SELECT * FROM Customers
> rec.Open strSQL, CurrentProject.Connection
>
> -- now I need the code to show the data existing in rec (rec - recordset)
> in
> a query or in a form
>
> What can I do?
>
> Thanks,
>
> JP
>
> "Alex Dybenko" wrote:
>
>> Hi,
>> what do you mean with query? query you can build on table or other query,
>> recordset you can sort, filter
>>
>> --
>> Best regards,
>> ___________
>> Alex Dybenko (MVP)
>> http://alexdyb.blogspot.com
>> http://www.PointLtd.com
>>
>> "Jose Perdigao" <JosePerdigao[ at ]discussions.microsoft.com> wrote in message
>> news:D413C705-343E-4A62-8FE5-5C27012FD1EE[ at ]microsoft.com...
>> >I would like to show the data from a recordset in a query.
>> >
>> > Is it possible? how can i do?
>> >
>> > thanks,
>> > JP
>>
>>

Re: how can I show the recordset data in a query?
Stefan Hoffmann <stefan.hoffmann[ at ]explido.de> 06.09.2006 08:36:00
hi Jose,

Jose Perdigao wrote:
[Quoted Text]
> I create a recordset using for example the following code
> Dim rec As ADODB.recordset
> DIM strSQL as String
> Set rec = New ADODB.recordset
> strSQL ="SELECT * FROM Customers
> rec.Open strSQL, CurrentProject.Connection
>
> -- now I need the code to show the data existing in rec (rec - recordset) in
> a query or in a form
>
> What can I do?

http://support.microsoft.com/?scid=kb%3Ben-us%3B281998&x=3&y=10



mfG
--> stefan <--
Re: how can I show the recordset data in a query?
Jose Perdigao 06.09.2006 13:10:07
I know this code, it works if the there is textbox and if the cotrolsource is
matching with the fields of recordset.
That's why, i ask to show the recordset in queries

By another words, how can I show the recordset if the fields of recordset is
changing (names and number of the fields)?
Is it possible?

Another question.
- I know to bound a recordset to a form (if the texts box is matching to the
recordset fields)
-I know to bound a recordset to a listbox or combo box.

Question.
How can I bound a recordset to a chart in MS Access 2003?

Thanks,

JP


"Stefan Hoffmann" wrote:

[Quoted Text]
> hi Jose,
>
> Jose Perdigao wrote:
> > I create a recordset using for example the following code
> > Dim rec As ADODB.recordset
> > DIM strSQL as String
> > Set rec = New ADODB.recordset
> > strSQL ="SELECT * FROM Customers
> > rec.Open strSQL, CurrentProject.Connection
> >
> > -- now I need the code to show the data existing in rec (rec - recordset) in
> > a query or in a form
> >
> > What can I do?
>
> http://support.microsoft.com/?scid=kb%3Ben-us%3B281998&x=3&y=10
>
>
>
> mfG
> --> stefan <--
>
Re: how can I show the recordset data in a query?
Stefan Hoffmann <stefan.hoffmann[ at ]explido.de> 06.09.2006 13:24:56
hi Jose,

Jose Perdigao wrote:
[Quoted Text]
> I know this code, it works if the there is textbox and if the cotrolsource is
> matching with the fields of recordset.
> That's why, i ask to show the recordset in queries
Use alias names for the fields, bind these aliases to your controls.

> By another words, how can I show the recordset if the fields of recordset is
> changing (names and number of the fields)?
> Is it possible?
Don't use the * in your SQL statment.

E.g.:
SQL = "SELECT Field1 AS Bound1, Field2 AS Bound2 FROM..."

> Question.
> How can I bound a recordset to a chart in MS Access 2003?
Same trick. Use aliases.


mfG
--> stefan <--
Re: how can I show the recordset data in a query?
Jose Perdigao 07.09.2006 13:41:02
Thanks Stefan by suggestions.
Unfortunately doesn't work properly.
When I change the recordset, the heads names are the same.
Another problem, if the controls are less than fields what can I do?

I think the best solution is, open new form and create programmatically the
number of controls matching with the fields name and with the number of
fields.
But I don't know how I can create controls programmatically.
Do you have suggestions?
Thanks

JP


"Stefan Hoffmann" wrote:

[Quoted Text]
> hi Jose,
>
> Jose Perdigao wrote:
> > I know this code, it works if the there is textbox and if the cotrolsource is
> > matching with the fields of recordset.
> > That's why, i ask to show the recordset in queries
> Use alias names for the fields, bind these aliases to your controls.
>
> > By another words, how can I show the recordset if the fields of recordset is
> > changing (names and number of the fields)?
> > Is it possible?
> Don't use the * in your SQL statment.
>
> E.g.:
> SQL = "SELECT Field1 AS Bound1, Field2 AS Bound2 FROM..."
>
> > Question.
> > How can I bound a recordset to a chart in MS Access 2003?
> Same trick. Use aliases.
>
>
> mfG
> --> stefan <--
>

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net