Did I sense some sarcasm?
David,
It really depends on what you want to do with the query, but Dorian's
concept
was generally what I would recommend, even if her response was a bit
abbrupt.
Generally, I have a "Splash" screen, which identifies my application and
provides users various options, depending on their permissions (some call
this a switchboard). The point is that in this forms Load event, I would
have some code that determines whether today is the first day of the month
(my guess is that you probably want the first work day of the month, so
that
is where I will start).
Start out with a function that will return the first workday of a given
month.
Something like:
Public Function fnFirstWorkday(Optional SomeDate As Variant = Null) As
Date
Dim dtLoop As Date
If IsNull(SomeDate) Then SomeDate = Date
For dtLoop = DateSerial(Year(SomeDate), Month(SomeDate), 1) To _
DateSerial(Year(SomeDate), Month(SomeDate), 7)
If Weekday(dtLoop, vbSaturday) > 2 Then
fnFirstWorkday = dtLoop
Exit For
End If
Next
End Function
Then, in the forms Load event, add some code that looks similar to:
Private Sub Form_Load
if fnFirstWorkday = Date() then
docmd.OpenQuery "query name"
end if
end sub
Personally, I would not open a query like this, I would create a
continuous
form that uses the query as its Record Source.
HTH
Dale
David said:
Oh thank you very much!
That's easy, just set an initial form in your startup options. Put some
code
[quoted text clipped - 18 lines]