Home All Groups Group Topic Archive Search About

Visual Basic and Access

Author
31 Jan 2006 1:00 PM
Rick
May be a Visual Basic programmer might answer this question.

Compared to SQL2000, Access has its own, original way to build the table
relationships in an SQL Statement.

I'm trying to build an application with Visual Basic 6 that shows some data
using DAO 3.6.

My problem is how can I find a methodology (not intuition) to build the
INNER JOIN statements. Why? Because the user is the one to pick the fields to
be shown on a grid and these fields may come from different tables with
different relationships.

Methodologically speaking, here there are several tables from which the user
might pick the fields, their relations are shown. How would you, experts in
Access 97(or XP), build the INNER JOIN section for the query(a SELECT
statement). Please, don't worry about what is in the SELECT part(fields), nor
the GROUPING section, nor the ORDER BY section. If you please, could you give
us a step by step method to build these JOINS? THis is no homework, I'm
struggling with so many cases that every time I pick a diffrent field I get
an Error in VB 6(DAO Object).

How can I use the MDB files to let the user pick whatever he wants (this is
the requirement for my project). Note: He is not supposed to use the query
builder, since he is not expected to have ACCESS installed, except for the
VB6 license.



Table1<-->Table2     Relationship:Table1ID
Table1<-->Table3     Relationship:Table1ID
Table3<-->Table2     Relationship:Table1ID AND Table3ID
Table4<-->Table2     Relationship:Table4ID
Table5<-->Table2     Relationship:Table5ID


Regards,

--
Rick

Author
31 Jan 2006 2:25 PM
Jeff Johnson [MVP: VB]
"Rick" <R***@discussions.microsoft.com> wrote in message
news:F68F757C-F35F-4E20-92B9-C64FDD8C87A9@microsoft.com...

> May be a Visual Basic programmer might answer this question.

So you mean you asked in an Access group and got no response? Surprising.
Author
31 Jan 2006 4:15 PM
Norm Cook
Perhaps this might help:
http://www.w3schools.com/sql/sql_join.asp

Show quoteHide quote
"Rick" <R***@discussions.microsoft.com> wrote in message
news:F68F757C-F35F-4E20-92B9-C64FDD8C87A9@microsoft.com...
> May be a Visual Basic programmer might answer this question.
>
> Compared to SQL2000, Access has its own, original way to build the table
> relationships in an SQL Statement.
>
> I'm trying to build an application with Visual Basic 6 that shows some
data
> using DAO 3.6.
>
> My problem is how can I find a methodology (not intuition) to build the
> INNER JOIN statements. Why? Because the user is the one to pick the fields
to
> be shown on a grid and these fields may come from different tables with
> different relationships.
>
> Methodologically speaking, here there are several tables from which the
user
> might pick the fields, their relations are shown. How would you, experts
in
> Access 97(or XP), build the INNER JOIN section for the query(a SELECT
> statement). Please, don't worry about what is in the SELECT part(fields),
nor
> the GROUPING section, nor the ORDER BY section. If you please, could you
give
> us a step by step method to build these JOINS? THis is no homework, I'm
> struggling with so many cases that every time I pick a diffrent field I
get
> an Error in VB 6(DAO Object).
>
> How can I use the MDB files to let the user pick whatever he wants (this
is
> the requirement for my project). Note: He is not supposed to use the query
> builder, since he is not expected to have ACCESS installed, except for the
> VB6 license.
>
>
>
> Table1<-->Table2     Relationship:Table1ID
> Table1<-->Table3     Relationship:Table1ID
> Table3<-->Table2     Relationship:Table1ID AND Table3ID
> Table4<-->Table2     Relationship:Table4ID
> Table5<-->Table2     Relationship:Table5ID
>
>
> Regards,
>
> --
> Rick
>
>
>
Author
31 Jan 2006 11:05 PM
Rick
It's ok for SQL topics, but not for JET SQL because JET's uses parentheses
and arranges the JOINS in a special way.

--
Rick


Show quoteHide quote
"Norm Cook" wrote:

> Perhaps this might help:
> http://www.w3schools.com/sql/sql_join.asp
>
> "Rick" <R***@discussions.microsoft.com> wrote in message
> news:F68F757C-F35F-4E20-92B9-C64FDD8C87A9@microsoft.com...
> > May be a Visual Basic programmer might answer this question.
> >
> > Compared to SQL2000, Access has its own, original way to build the table
> > relationships in an SQL Statement.
> >
> > I'm trying to build an application with Visual Basic 6 that shows some
> data
> > using DAO 3.6.
> >
> > My problem is how can I find a methodology (not intuition) to build the
> > INNER JOIN statements. Why? Because the user is the one to pick the fields
> to
> > be shown on a grid and these fields may come from different tables with
> > different relationships.
> >
> > Methodologically speaking, here there are several tables from which the
> user
> > might pick the fields, their relations are shown. How would you, experts
> in
> > Access 97(or XP), build the INNER JOIN section for the query(a SELECT
> > statement). Please, don't worry about what is in the SELECT part(fields),
> nor
> > the GROUPING section, nor the ORDER BY section. If you please, could you
> give
> > us a step by step method to build these JOINS? THis is no homework, I'm
> > struggling with so many cases that every time I pick a diffrent field I
> get
> > an Error in VB 6(DAO Object).
> >
> > How can I use the MDB files to let the user pick whatever he wants (this
> is
> > the requirement for my project). Note: He is not supposed to use the query
> > builder, since he is not expected to have ACCESS installed, except for the
> > VB6 license.
> >
> >
> >
> > Table1<-->Table2     Relationship:Table1ID
> > Table1<-->Table3     Relationship:Table1ID
> > Table3<-->Table2     Relationship:Table1ID AND Table3ID
> > Table4<-->Table2     Relationship:Table4ID
> > Table5<-->Table2     Relationship:Table5ID
> >
> >
> > Regards,
> >
> > --
> > Rick
> >
> >
> >
>
>
>
Author
1 Feb 2006 2:13 PM
Jeff Johnson [MVP: VB]
"Rick" <R***@discussions.microsoft.com> wrote in message
news:A56F47B2-776C-4873-A170-1E9975AF38AB@microsoft.com...

> It's ok for SQL topics, but not for JET SQL because JET's uses parentheses
> and arranges the JOINS in a special way.

Can you provide a sample of a Jet SQL join that MUST be arranged with
parentheses?