Re: Form Advice Relating to Queries



Well, it's not entirely true that I don't know how to use it.
It's probably lazyness / slow reading on my part. I have several excellent
books, Mastering Access 2002 Premium Edition, Access InsideOut 2002 by Helen
Feddema and VBA 2000 by Suzanne Novalis, so I really need as slap on the
hand!!
Rather just looking for any tips that would help me reason it out that
constantly refer to the books.
Regards
Dermot


"Allen Browne" wrote:

You do not know how to use the query design window in Access?

Any basic book on Access will help you with that.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Dermot" <Dermot@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C0E542E5-4CBB-43E8-BA42-CC355495F86D@xxxxxxxxxxxxxxxx
Thanks Allen,
Quote
Not sure I understand this question.

It was a bit of a silly question.....I asked it before thinking!!
For simple queries use a simple sql statement in the record source
property.
For more complex queries, use vba programming.....

I haven't quite worked out how to use the Query Builder via ... , any time
I
have tried using it I am unsucess, up to now I have really taken advise on
what to enter....would you have any tutorial links explaining how to use
it
properly?
If this should be a nother posting let me know and I will repost fresh.
Thanks again
Dermot


"Allen Browne" wrote:

Not sure I understand this question.

The form's RecordSource property is a string. The string needs to be a
valid
SQL statement (or the name of a table or query.)

If it is a simple string, just type it straight into the Properties box
in
the RecordSource property.

If you would like the query builder to help you, click the Build button
(...) beside the property, and design the query graphically.

If the query statement needs to change based on other circumstances (such
as
which criteria boxes the user entered something in, or selectively using
a
subquery to limit the form to matching records in another table), then
you
will want to use VBA code to create the string and assign it at runtime.

"Dermot" <Dermot@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E27DF75A-E3B3-46EB-A0A0-2C3843791B29@xxxxxxxxxxxxxxxx
Hi Allen
Thanks for the link to the cboSelector....I am using it already to
select
internal and external phone numbers using lastnamefirst.
One question I wondered about....what is the difference between using
vba
in
the record source property and entering it in the vba editor....it
woiuld
seem to achieve the same goal but there must be a difference...would it
be
that the record source property is limited to a small code size?
"Allen Browne" wrote:

You can display the surname + first name in the combo by concatenating
the 2
fields in the RowSource property of the combo.

Assuming your table has an AutoNumber primary key field named ID, you
might
set the combo's RowSource to something like this:
SELECT ID, LastName & " " & FirstName AS FullName
FROM [Contact Numbers] ORDER BY LastName, FirstName
Other propertiers for the combo:
Column Count 2
Column Widths 0
Control Source {leave this blank!}

It sounds like you want to use this combo to move to the record for
the
names selected. If so, see:
Using a Combo Box to Find Records
at:
http://allenbrowne.com/ser-03.html

"Dermot" <Dermot@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5ED5E24C-B9D1-4843-A834-DA1AFFAD811B@xxxxxxxxxxxxxxxx
If I have a Flat table "Contact Numbers" (No Relationships)
Which has within it fields "FirstName" and "LastName"
I am using an SQL statement to concatenate both of the above name
fields
as
"LastName First" separated by a comma.....ie..Bloggs, Joe

How do I incorporate the "LastName First" field into a combobox
control,
so
that when I click on a name in the dropdown list, it returns the
selected
individuals contact Details in either a Labels or Text boxs on the
form,
or
any other recommended way of returning the contact details from the
described
combobox?



.