Expression Builder basic question on syntax / Or / how to incorporatea SQL query into a textbox cont

R

raylopez99

I would like to add a textbox on my control that is not linked to a
database (like the other textboxes are, which are linked to fields in
the database), that takes the sum of all the textboxes in the form.
How to do this using "Expression Builder"? (Or otherwise?). I'm
having problems with the syntax, since I keep getting the "#Name?"
runtime error on the textbox. **See below, I also would like to know
using Visual Basic if possible.

Concrete example:

Field #1 (linked to a database): Quantity
Field #2 (" ") : Price
Textbox #3 (this I want to compute from fields #1 and #2, in a textbox
control on my Access 2003 form): = Quantity * Price

Any way appreciated. What I did was run a SQL query ("SELECT
Sum(Subform1.Quantity*Subform1.PricePerShare) AS SumTotal
FROM AccountStocks INNER JOIN Subform1 ON
AccountStocks.AccountStockID=StkTransactions.Account_StockID
GROUP BY AccountStocks.AccountStockID;) <--two tables, linked by a
key, the query being called "Query1" having alias SumTotal

This SQL query works (when run seperately), giving a sum for each
record, and just for learning purposes I'd like to incorporate this
query using the "Expression builder" for the textbox #3.

However, I'll take any easy way of doing the above.

Thank you

RL

PS--I tried various things, and nothing seems to work. For example I
took the name of the Textbox, Textbox3, and set it equal to ("Query1!
SumTotal"). Then....(various other things tried deleted)...

UPDATE: Ok, surfing the net before I hit enter (sorry I'm on a dialup
modem right now, so surfing is painful) I see that a lot of people
don't use the Expression Builder, instead they like to use Visual
Basic in an [event procedure] That's fine, I'd like to know how to
incorporate the SQL query above...do I use it in an event procedure
(and which one? There are so many, in the past for other stuff I use
"OnGotFocus" but I doubt that's the best for this query since the user
would have to click on the box to get an answer).

Also, do I set the SQL query as a "Control Source" under the
Properties tab of the textbox #3? (Just tried that, using an equal
sign in front, and without it, and it doesn't work, still gives the
#Name? scope problem again).

Any ideas? This question is very basic so please don't think too
hard...(I think).

RL
 
M

Minton M

I would like to add a textbox on my control that is not linked to a
database (like the other textboxes are, which are linked to fields in
the database), that takes the sum of all the textboxes in the form.
How to do this using "Expression Builder"? (Or otherwise?). I'm
having problems with the syntax, since I keep getting the "#Name?"
runtime error on the textbox. **See below, I also would like to know
using Visual Basic if possible.

Concrete example:

Field #1 (linked to a database): Quantity
Field #2 (" ") : Price
Textbox #3 (this I want to compute from fields #1 and #2, in a textbox
control on my Access 2003 form): = Quantity * Price

Any way appreciated. What I did was run a SQL query ("SELECT
Sum(Subform1.Quantity*Subform1.PricePerShare) AS SumTotal
FROM AccountStocks INNER JOIN Subform1 ON
AccountStocks.AccountStockID=StkTransactions.Account_StockID
GROUP BY AccountStocks.AccountStockID;) <--two tables, linked by a
key, the query being called "Query1" having alias SumTotal

This SQL query works (when run seperately), giving a sum for each
record, and just for learning purposes I'd like to incorporate this
query using the "Expression builder" for the textbox #3.

However, I'll take any easy way of doing the above.

Thank you

RL

PS--I tried various things, and nothing seems to work. For example I
took the name of the Textbox, Textbox3, and set it equal to ("Query1!
SumTotal"). Then....(various other things tried deleted)...

UPDATE: Ok, surfing the net before I hit enter (sorry I'm on a dialup
modem right now, so surfing is painful) I see that a lot of people
don't use the Expression Builder, instead they like to use Visual
Basic in an [event procedure] That's fine, I'd like to know how to
incorporate the SQL query above...do I use it in an event procedure
(and which one? There are so many, in the past for other stuff I use
"OnGotFocus" but I doubt that's the best for this query since the user
would have to click on the box to get an answer).

Also, do I set the SQL query as a "Control Source" under the
Properties tab of the textbox #3? (Just tried that, using an equal
sign in front, and without it, and it doesn't work, still gives the
#Name? scope problem again).

Any ideas? This question is very basic so please don't think too
hard...(I think).

RL

Hi,

Here's a cheap and cheerful way to get an SQL result into a textbox.
Put the following code in a module:

Public Function GetResult(sSQL As String) As Variant

On Error GoTo err
Dim rs As Recordset

InitDB

Set rs = db.OpenRecordset(sSQL)
If Not rs.EOF Then
GetResult = rs(0)
rs.Close
End If

Set rs = Nothing
Exit Function
err:
Debug.Print "GetResult error: SQL=" & sSQL & ". Error: " & Error$

End Function

And then you can either set the control source of the textbox to:

=GetResult("select count(*) from SomeTable")

or use VBA to call the function and set the textbox's value to the
result.

Hope this helps,
James
 
B

BruceM

One way is to add a text box to the form. Set its Control Source to:
=[Quantity]*[Price]
Another way is to use the same expression in a query. In a blank column in
query design view add something like:
SumTotal: [Quantity]*[Price]
Base the form on the query, and bind a text box on the form to SumTotal.

What I would do is use the query design grid, then switch to SQL view to see
how the SQL is assembled. To bind the control to the query field you can
just choose the field as the Control Source, assuming the field is in the
form's Record Source. An equals sign should work, but just use the name of
the field. If you are going to use the full name I believe it needs to be
Queries!Query1!SumTotal, but from what I can make out that is not necessary.

If you are using VBA it would probably be run in the After Update event for
the Quantity and Price text boxes, and in the form's Current event (so that
you see the extended price when you navigate to an existing record).

raylopez99 said:
I would like to add a textbox on my control that is not linked to a
database (like the other textboxes are, which are linked to fields in
the database), that takes the sum of all the textboxes in the form.
How to do this using "Expression Builder"? (Or otherwise?). I'm
having problems with the syntax, since I keep getting the "#Name?"
runtime error on the textbox. **See below, I also would like to know
using Visual Basic if possible.

Concrete example:

Field #1 (linked to a database): Quantity
Field #2 (" ") : Price
Textbox #3 (this I want to compute from fields #1 and #2, in a textbox
control on my Access 2003 form): = Quantity * Price

Any way appreciated. What I did was run a SQL query ("SELECT
Sum(Subform1.Quantity*Subform1.PricePerShare) AS SumTotal
FROM AccountStocks INNER JOIN Subform1 ON
AccountStocks.AccountStockID=StkTransactions.Account_StockID
GROUP BY AccountStocks.AccountStockID;) <--two tables, linked by a
key, the query being called "Query1" having alias SumTotal

This SQL query works (when run seperately), giving a sum for each
record, and just for learning purposes I'd like to incorporate this
query using the "Expression builder" for the textbox #3.

However, I'll take any easy way of doing the above.

Thank you

RL

PS--I tried various things, and nothing seems to work. For example I
took the name of the Textbox, Textbox3, and set it equal to ("Query1!
SumTotal"). Then....(various other things tried deleted)...

UPDATE: Ok, surfing the net before I hit enter (sorry I'm on a dialup
modem right now, so surfing is painful) I see that a lot of people
don't use the Expression Builder, instead they like to use Visual
Basic in an [event procedure] That's fine, I'd like to know how to
incorporate the SQL query above...do I use it in an event procedure
(and which one? There are so many, in the past for other stuff I use
"OnGotFocus" but I doubt that's the best for this query since the user
would have to click on the box to get an answer).

Also, do I set the SQL query as a "Control Source" under the
Properties tab of the textbox #3? (Just tried that, using an equal
sign in front, and without it, and it doesn't work, still gives the
#Name? scope problem again).

Any ideas? This question is very basic so please don't think too
hard...(I think).

RL
 
K

Klatuu

Given that Access is a File Server application rather than a Client Server
application, it is always best to avoid unnecessary hits on the database.
They slow the application and increase network load.

You can easily get a sum of two text boxes like you want. Just do the math
using the two controls you want. Use only the control name without the Me.
Also, it is a good idea when doing this to wrap your values in the Nz
function. Any calculations that contain a Null value will result in Null.

Make this the Control Source of the control you want the sum in:

=Nz(txtQuantity,0) * Nz(txtPrice,0)
--
Dave Hargis, Microsoft Access MVP


raylopez99 said:
I would like to add a textbox on my control that is not linked to a
database (like the other textboxes are, which are linked to fields in
the database), that takes the sum of all the textboxes in the form.
How to do this using "Expression Builder"? (Or otherwise?). I'm
having problems with the syntax, since I keep getting the "#Name?"
runtime error on the textbox. **See below, I also would like to know
using Visual Basic if possible.

Concrete example:

Field #1 (linked to a database): Quantity
Field #2 (" ") : Price
Textbox #3 (this I want to compute from fields #1 and #2, in a textbox
control on my Access 2003 form): = Quantity * Price

Any way appreciated. What I did was run a SQL query ("SELECT
Sum(Subform1.Quantity*Subform1.PricePerShare) AS SumTotal
FROM AccountStocks INNER JOIN Subform1 ON
AccountStocks.AccountStockID=StkTransactions.Account_StockID
GROUP BY AccountStocks.AccountStockID;) <--two tables, linked by a
key, the query being called "Query1" having alias SumTotal

This SQL query works (when run seperately), giving a sum for each
record, and just for learning purposes I'd like to incorporate this
query using the "Expression builder" for the textbox #3.

However, I'll take any easy way of doing the above.

Thank you

RL

PS--I tried various things, and nothing seems to work. For example I
took the name of the Textbox, Textbox3, and set it equal to ("Query1!
SumTotal"). Then....(various other things tried deleted)...

UPDATE: Ok, surfing the net before I hit enter (sorry I'm on a dialup
modem right now, so surfing is painful) I see that a lot of people
don't use the Expression Builder, instead they like to use Visual
Basic in an [event procedure] That's fine, I'd like to know how to
incorporate the SQL query above...do I use it in an event procedure
(and which one? There are so many, in the past for other stuff I use
"OnGotFocus" but I doubt that's the best for this query since the user
would have to click on the box to get an answer).

Also, do I set the SQL query as a "Control Source" under the
Properties tab of the textbox #3? (Just tried that, using an equal
sign in front, and without it, and it doesn't work, still gives the
#Name? scope problem again).

Any ideas? This question is very basic so please don't think too
hard...(I think).

RL
 
R

raylopez99

Here's a cheap and cheerful way to get an SQL result into a textbox.
Put the following code in a module:

Public Function GetResult(sSQL As String) As Variant

    On Error GoTo err
    Dim rs As Recordset

    InitDB

I think this should be commented out? 'InitDB? because it did not
compile unless commented out.

And then you can either set the control source of the textbox to:

=GetResult("select count(*) from SomeTable")

This did not work. I think Visual Basic needs a better debugger, or
maybe I need more experience. UPDATE: I ran another error trap, a
message box, and it turns out the exception/error "err:" trap is being
sprung, so something is wrong with the main code. Actually, the more
I look at this code, the more I see that it does nothing. Where's the
meat? LOL. Where is the SQL statement run? Perhaps you meant to add
something at the 'InitDB" part, but left it out? Sorry I'm new to
VB. Can you clarify? I'd like to learn this for future reference.

RL
 
M

Minton M

I think this should be commented out? 'InitDB? because it did not
compile unless commented out.



This did not work. I think Visual Basic needs a better debugger, or
maybe I need more experience. UPDATE: I ran another error trap, a
message box, and it turns out the exception/error "err:" trap is being
sprung, so something is wrong with the main code. Actually, the more
I look at this code, the more I see that it does nothing. Where's the
meat? LOL. Where is the SQL statement run? Perhaps you meant to add
something at the 'InitDB" part, but left it out? Sorry I'm new to
VB. Can you clarify? I'd like to learn this for future reference.

RL

Hold on, I think I've given you a sledgehammer to crack a walnut. If
you're carrying out a simple calculation, definitely go with the above
suggestions from Dave and co. My solution is only if you're pulling
some value somewhere in the database and you don't want to call
DLookup. Sorry, the InitDB string in my function just sets db to
CurrentDB - if you're not too familiar with this, I'd recommend going
with something simpler.

I'm always getting myself in trouble this way.

One day I'll stop.

-- James
 
R

raylopez99

One way is to add a text box to the form.  Set its Control Source to:
=[Quantity]*[Price]

SOrry BruceM but I mixed my metaphors in the OP: I meant I need a
"product" where the sum of the product of two columns is taken; so
price * quantity for each row, then the sum of all rows in the table
to give a single scalar number answer. But this is a SQL query
question (and I'm very new to SQL, but I do have the basics down--
however this is not found in any book of mine and I have several). So
I''ll post this in a SQL forum, however, do please read further
regarding the Access portion of this question.
Another way is to use the same expression in a query.  In a blank columnin
query design view add something like:
SumTotal: [Quantity]*[Price]
Base the form on the query, and bind a text box on the form to SumTotal.

Yes, if it was a simple such calculation I've done this, and can do
that, but this query is more complex.
What I would do is use the query design grid, then switch to SQL view to see
how the SQL is assembled.  

Yes, I've run various simple SQL queries and bound them to a textbox,
but in this example there's a rub (read below please).
To bind the control to the query field you can
just choose the field as the Control Source, assuming the field is in the
form's Record Source.  

AHA! Therein is the rub: "assuming the field is in the form's Record
Source". This is the problem, because in this table (actually it's a
subform, or a child table to a parent table), there are TWO record
sources. The table name is "SubformChildTable". The first record
source is the entire subform (child table), which I just found out
(this is my first week with Access) is nothing more than a simple SQL
statement along the lines "SELECT * FROM SubformChildTable; This SQL
statement Access simply calls by the name of the table, here,
"SubformChildTable" (before I discovered this today I thought there
was something mysterious to the process, LOL). However, there's a
SECOND record source, namely the Query for the product problem above.
What I've found out (and your advice is welcome here) is that SQL does
not like to have two or more record sources on the line for Record
Source in the Properties tab of the subform (the upper left corner
rectangle of the form). Correct me if I'm wrong, since if somehow I
could sneak in two record sources it would solve this problem.

So, what I tried to do was construct a single query as a Record
Source, that combined the two SQL queries. Not to bore you with
details, I tried a so-called "UNION SELECT" SQL query, but I muddled
it and though I did get every textbox in the subform bound to this
UNION SELECT query, the critical "product" textbox was giving a wrong
answer (far too many columns rather than a single column, but that's a
SQL statement question).

In short, if you have any insight on how to make Access look at two or
more record sources without having to write a single, sole SQL
statement that combines the two record sources, that would be
appreciated.

RL
 
R

raylopez99

Hold on, I think I've given you a sledgehammer to crack a walnut. If
you're carrying out a simple calculation, definitely go with the above
suggestions from Dave and co. My solution is only if you're pulling
some value somewhere in the database and you don't want to call
DLookup. Sorry, the InitDB string in my function just sets db to
CurrentDB - if you're not too familiar with this, I'd recommend going
with something simpler.

No, I like your solution! I'm just wondering, since I going to put it
in my library for future reference, what the 'InitDB' function should
look like (since I commented it out). I would like to be able to make
your solution work, so I can put it in my library. If you have the
complete code (if it's not too complex to describe) I would appreciate
it.

Don't stop, I appreciate your complicated help. BTW the SQL query I
found out on another board (to sum a column of a table where the
column is a virtual column comprised of two other columns) is
complicated, and like Klatuu says, probably should be avoided for
performance reasons. I include it for future reference below.

RL

This would be a lot easier if you proved DDL that defines the table,
INSERTs that create test data, and the desired output. That might
resolve questions such as what exactly is the Product column that is
being multiplied by the Quantity column - if not for the
multiplication I would have assumed it was the key to Product.

At any rate, you might get away with something like...

SELECT 'I' as ItemOrTotal, P, Q, P * Q as Whatever
FROM SomeTable
UNION ALL
SELECT 'T', 0, 0, SUM(P * Q)
FROM SomeTable
ORDER BY ItemOrTotal

That will give you a row with the total. The ORDER BY should place
it
last. If you can't handle the ItemOrTotal column, eliminate it and
live with the position of the total row being unpredictable.

Roy Harvey
Beacon Falls, CT
 
R

raylopez99

Given that Access is a File Server application rather than a Client Server
application, it is always best to avoid unnecessary hits on the database.  
They slow the application and increase network load.

You can easily get a sum of two text boxes like you want.  Just do the math
using the two controls you want.  Use only the control name without the Me.  
Also, it is a good idea when doing this to wrap your values in the Nz
function.  Any calculations that contain a Null value will result in Null.

Make this the Control Source of the control you want the sum in:

    =Nz(txtQuantity,0) * Nz(txtPrice,0)

Klatuu,

Thanks! Very helpful for me.

If you can easily generate the code for taking a "running sum" of two
columns (as rows are added), along the lines of the above, and where
to put this in the Access VB, please let me know. THe idea is this:
take the product of two columns, then, for each row, as you add rows,
take the sum of this product, so you can generate the SUM(X) of all
rows X (to get a grand total for the entire table, of all the
product*price's).

If it's too complicated or time consuming, please just tell me in
words what it might look like (for future reference). In another
group I asked what the SQL query would look like for this task and got
a rather complicated looking query (reproduced in this thread) , so I
suspect it's not one-line trivial (I had thought there's a simple SUM
SQL function to do this, but SUM is not entirely for this task)

RL
 
C

Cindy

Hi all -

While I totally agree that James had a sledgehammer to crack a walnut
here, the sledgehammer sure was a fun answer that will be valuable to
me in lots of places. I had to give that 5 stars even though it was
overkill for the situation, cause, gosh, the flexibility/power of that
one is great!! Thanks James!
 
R

raylopez99

Cindy--did "InitDB" compile? I had to comment it out, and could not
get this solution by Minton M/James to work.

RL
 
C

Cindy

It sounds like James simply meant for someone to set the database at
that line - I'm guessing it was shorthand for "initialize the
database"....

I would rewrite it as follows (add error handling in case there's a
problem with the sql in creating the recordset)

Dim rs As DAO.Recordset
Dim db As DAO.Database

Set db = CurrentDb
Set rs = db.OpenRecordset(sSQL)
If Not rs.EOF Then
GetResult = rs(0)
rs.Close
End If

db.Close

Set rs = Nothing
Set db = Nothing

Cindy
 
R

raylopez99

It sounds like James simply meant for someone to set the database at
that line - I'm guessing it was shorthand for "initialize the
database"....

I would rewrite it as follows (add error handling in case there's a
problem with the sql in creating the recordset)

All right! Thanks Cindy, your code worked (compiled and ran
properly).

RL
 
P

Paul Shapiro

If I remember the orginal problem correctly, you want to sum a calculation
over the subform's records. You can add an unbound textbox to the subform's
Form Footer section and set it's control source to something like:
=Sum(Quantity*Price), where Quantity and Price are the column names in the
subform recordset.
With the subform in form mode, you should see the result. If the subform is
in datasheet mode, you won't see the form footer, but the value will still
be calculated. Give that unbound textbox a name like txtTotal. On the main
form you can add another unbound control and set it's control source to:
=subDetails.Form!txtTotal, where subDetails is the name assigned to the
subform control which contains your subform. Now you should see the
calculation on the main form even when the subform is in datasheet mode.

Given that Access is a File Server application rather than a Client Server
application, it is always best to avoid unnecessary hits on the database.
They slow the application and increase network load.

You can easily get a sum of two text boxes like you want. Just do the math
using the two controls you want. Use only the control name without the Me.
Also, it is a good idea when doing this to wrap your values in the Nz
function. Any calculations that contain a Null value will result in Null.

Make this the Control Source of the control you want the sum in:

=Nz(txtQuantity,0) * Nz(txtPrice,0)

Klatuu,

Thanks! Very helpful for me.

If you can easily generate the code for taking a "running sum" of two
columns (as rows are added), along the lines of the above, and where
to put this in the Access VB, please let me know. THe idea is this:
take the product of two columns, then, for each row, as you add rows,
take the sum of this product, so you can generate the SUM(X) of all
rows X (to get a grand total for the entire table, of all the
product*price's).

If it's too complicated or time consuming, please just tell me in
words what it might look like (for future reference). In another
group I asked what the SQL query would look like for this task and got
a rather complicated looking query (reproduced in this thread) , so I
suspect it's not one-line trivial (I had thought there's a simple SUM
SQL function to do this, but SUM is not entirely for this task)

RL
 
R

raylopez99

If I remember the orginal problem correctly, you want to sum a calculation
over the subform's records. You can add an unbound textbox to the subform's
Form Footer section and set it's control source to something like:
=Sum(Quantity*Price), where Quantity and Price are the column names in the
subform recordset.
With the subform in form mode, you should see the result. If the subform is
in datasheet mode, you won't see the form footer, but the value will still
be calculated. Give that unbound textbox a name like txtTotal. On the main
form you can add another unbound control and set it's control source to:
=subDetails.Form!txtTotal, where subDetails is the name assigned to the
subform control which contains your subform. Now you should see the
calculation on the main form even when the subform is in datasheet mode.

Yes, I figured it out after looking at Allen Browne's latest example,
which involves forms and subforms, hiding one button behind the other,
using the headers and footers to hide columns that do aggregate
functions like Sum(X), and other neat tricks--very timely!

Now I'm pulling my hair over running a SQL query inside an Event
Procedure...see my other post.

I saw your post about the Access 2007 bug--it sounds pretty rare
(readonly is a good idea but for a newbie like me is 'rare')--and it's
perhaps another reason not to rush into Vista (I'm posting from a
Vista machine now--seems like Vista/Office 2007 stuff is a work in
progress).

RL
 
B

BruceM

One way is to add a text box to the form. Set its Control Source to:
=[Quantity]*[Price]

SOrry BruceM but I mixed my metaphors in the OP: I meant I need a
"product" where the sum of the product of two columns is taken; so
price * quantity for each row, then the sum of all rows in the table
to give a single scalar number answer. But this is a SQL query
question (and I'm very new to SQL, but I do have the basics down--
however this is not found in any book of mine and I have several). So
I''ll post this in a SQL forum, however, do please read further
regarding the Access portion of this question.
Another way is to use the same expression in a query. In a blank column in
query design view add something like:
SumTotal: [Quantity]*[Price]
Base the form on the query, and bind a text box on the form to SumTotal.

Yes, if it was a simple such calculation I've done this, and can do
that, but this query is more complex.
What I would do is use the query design grid, then switch to SQL view to
see
how the SQL is assembled.

Yes, I've run various simple SQL queries and bound them to a textbox,
but in this example there's a rub (read below please).
To bind the control to the query field you can
just choose the field as the Control Source, assuming the field is in the
form's Record Source.

AHA! Therein is the rub: "assuming the field is in the form's Record
Source". This is the problem, because in this table (actually it's a
subform, or a child table to a parent table), there are TWO record
sources. The table name is "SubformChildTable". The first record
source is the entire subform (child table), which I just found out
(this is my first week with Access) is nothing more than a simple SQL
statement along the lines "SELECT * FROM SubformChildTable; This SQL
statement Access simply calls by the name of the table, here,
"SubformChildTable" (before I discovered this today I thought there
was something mysterious to the process, LOL). However, there's a
SECOND record source, namely the Query for the product problem above.
What I've found out (and your advice is welcome here) is that SQL does
not like to have two or more record sources on the line for Record
Source in the Properties tab of the subform (the upper left corner
rectangle of the form). Correct me if I'm wrong, since if somehow I
could sneak in two record sources it would solve this problem.

So, what I tried to do was construct a single query as a Record
Source, that combined the two SQL queries. Not to bore you with
details, I tried a so-called "UNION SELECT" SQL query, but I muddled
it and though I did get every textbox in the subform bound to this
UNION SELECT query, the critical "product" textbox was giving a wrong
answer (far too many columns rather than a single column, but that's a
SQL statement question).

In short, if you have any insight on how to make Access look at two or
more record sources without having to write a single, sole SQL
statement that combines the two record sources, that would be
appreciated.

RL

The Record Source can be a named query. If there is a second record source
for the subform, presumably its records are related to the main form
records, or else they are related to the subform records. I don't know
quite what you mean by the "product problem above". I don't know what data
are contained in SubformChildTable, so I can't quite see how Quantity and
Price enter into the picture. While I believe it is possible in some
circumstance to reference a field from a table outside of the record source,
I don't see that it would have any advantage over including the table in the
record source, and there are probably considerable disadvantages, including
inefficiency.
If the two subform record sources are related to the main record, but not to
each other, you could use two separate subforms. For instance, a vendor
database (to keep track of yoru vendors) could have the vendor information
as the main record, with separate subforms for plant locations and sales
contacts. Without knowing more about just what your database does it is
difficult to be more specific.
BTW, many people avoid the use of the asterisk in queries or SQL except for
development purposes, especially if there is a WHERE or ORDER BY in the SQL.
 
M

Minton M

All right! Thanks Cindy, your code worked (compiled and ran
properly).

RL

Cindy - yes that was correct! Sorry, I've been boozing it up the last
few days...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top