Hi Alison,
for more info on the Recordset Property, see below...
~~~~ Properties and Methods ~~~~
Just like in the real world, every object has properties and
methods.
Properties are like adjectives that describe an object
Methods are like verbs and define actions an object can do
For instance, you are a human and have properties such as
hair color, eye color, height, weight, ... and methods such
as eat, walk, run, jump, ... make babies -- Add to a
collection
In the design view, you can show the property sheet, which
will show information for the selected item(s).
~~~~ turn on Properties window ~~~~
When you are in the design view, turn on/off the Properties
window -->
1. from menu: View, Properties
OR
2. right-click and choose Properties from the shortcut menu
and then click on various objects. The properties window
changes as you change what is selected. If you have
multiple objects selected, the values for the properties
they have in common will be displayed
Try it!
~~~~ setting Properties vs. resizing with handles ~~~~
I like to make the width of controls exact -- like 0.25,
0.3, 0.4, 0.5, 0.6, 0.75, 1, 1.25, etc
This is especially handing for lining up labels to controls
under them
~~~~ selecting objects ~~~~
you can select multiple controls
1. click and drag the mouse and everything your imaginary
rectangle touches before you let go will be selected
OR
2. click, shift-click, etc
shift-click actually toggles the select status without
affecting the other items selected
OR
3. click (optionally, and drag) in a ruler
while the mouse is down, you will see a line extend across
(vertical ruler) or down (horizontal ruler)
if you click and drag, the ruler will turn dark indicating
where you started and stopped
-- everything the line/rectangle touches will be selected
OR
4. drop down the objects combo (left-most control on design
toolbar) and select something by its name
~~~~ select Form or Report ~~~~
To select the form (or report), you may:
1. click in the upper left corner where the rulers intersect
OR
2. click completely outside the designed area in the dark
gray space
OR
3. press CTRL-R
OR
4. from menu: Edit, Select Form/Report
~~~~ building event code ~~~
To build an event, click in the property sheet for the
appropriate object in the appropriate location and then
click the builder (...) button off to the right
Access will provide the procedure declaration and the
procedure end -- you put the lines in between.
~~~~ Name property ~~~~
Procedures are NAMED according to the object name (except
the form object), so ALWAYS change the NAME property of any
object to something logical.
When the properties window is displayed and only one thing
is selected, the Name appears in the title bar of the
Properties window
If multiple items are selected, you will see "Multiple
Selection" on the title bar
~~~~ ControlSource, SourceObject ~~~~
It is important to realize that the Name is NOT what is
displayed in a control. If the control is (for instance a
textbox or combo box), you will see the ControlSource displayed.
If the object is (for instance) a subform or subreport, what
you see displayed is the SourceObject
For bound objects, I like to make the Name property match
the source property (this does not, btw, follow naming
conventions, but for me, it eases confusion)
As always, avoid using spaces and special characters when
naming objects -- use the underscore character _ to separate
and use mixed case for readability
~~~~ Recordset Property ~~~~
from the design view of a report or form:
turn on Properties
(from menu: View, Properties)
select the report or form
(click in the upper left where the rulers intersect)
click on the Data tab in Properties window
there you will see the RecordSet property
once you click in the property, you will see the builder
button ... to the right
If your report is based on a query, this takes you to the
query design screen
If your report is based on a SQL statement, you can modify
it like the design view of a query (you can also press
SHIFT-F2 to use the Zoom Box to change the SQL)
If your report is based on a table, you will be asked if you
want to make a query
~~~~ Builder Button ~~~~
The RowSource property for a combo or list box is like the
RecordSource property for a form or report -- you are
choosing where the data will come from that is displayed.
The Builder Button ... will be displayed when you click IN
the property.
For choosing colors that are not on the color palette (like
ForeColor, BackColor, Bordercolor), click the builder
button. Once in the palette dialog box, click "Define
Custom Colors" -- the dialog box will expand and you can set
the amounts for Red/Green/Blue or adjust
Hue/Saturation/Luminosity. There is also a slider control
with a triangle you can drag up or down to change the
Luminosity (brightness). I like to drag it up and fade out
colors, especially for BackColor.
~~~~ Events ~~~~
"Properties" listed on the Events tab are actually methods
.... such as OnCurrent for form, AfterUpdate for Control, etc
~~~~ Learning the properties ~~~~
Explore the property sheet. Get familiar with how
properties are grouped on the tabs and the different
properties for different objects.
~~~~ Help on Properties ~~~~
You can get help about any property by pressing F1 while in
the property you want more information on.
~~~~ general help ~~~~
For general help about Access, I find it interesting and
informative to read the help starting from the beginning of
the Contents. In fact, if you have the desire to print a
ream of paper, it would be good to print it like a book and
read it so you can also take notes -- and you can read it
away from the computer -- a good time to put new information
into your head is just before you sleep ... let your
subconscious figure it out!
Warm Regards,
Crystal
Microsoft Access MVP 2006
*
Have an awesome day
remote programming and training
strive4peace2006 at yahoo.com
*
Hi Crystal,
You are quite right; the query does not show the records, although I was not
expecting it to. I guess I was expecting to just see the header and the zero
count in the report - duh!
Sorry to be such a dummy but can you tell me where to find the Recordset
properties for the report. I can't find anything called 'recordset' anywhere
in the report properties (so I figure I'm looking in the wrong place!)
Regards
Alison
Hi Alison,
If the report doesn't show data ... are you sure that the
query does?
click on the builder button in the Recordset property of the
report (...) -- see if the headers you want to show with no
data actually do show in the recordset -- my guess is that
they don't...
Warm Regards,
Crystal
Microsoft Access MVP 2006
*
Have an awesome day
remote programming and training
strive4peace2006 at yahoo.com
*
[quoted text clipped - 21 lines]