Nathan,
You're not frustrating me. We all have questions and we were all new to
access at one time or another!
but what do you mean by "Public gtxtCalTarget As TextBox"?
Well, it hard to explain so best bet is to open the sample database from
Allen's website and open the frmExample in design mode. Select the
cmdCalDate button and right-click on it and select build event from the list.
This will open the VBE at the code for that button. Now scroll to the top
of the page for that module.
It should look like:
Option Compare Database
Option Explicit
'Calendar form variable:
Public gtxtCalTarget As TextBox 'Text box to return the date from the
calendar to.
Public Function CalendarFor(txt As TextBox, Optional strTitle As String)
...
Now perform the same operation on your form and button. Check the module
page header (top of the page). Does it have the
'Calendar form variable:
Public gtxtCalTarget As TextBox 'Text box to return the date from the
calendar to.
at the very top before any function/sunroutine declarations? If not, please
add it, compile and save your changes and try it again.

Signature
Hope this helps,
Daniel Pineault
If this post was helpful, please rate it by using the vote buttons.
> I am sorry I don't understand your questions as well as I would like since my
> knowledge of Access is fairly basic. I don't mean to frustrate you, but what
[quoted text clipped - 52 lines]
> > > > >
> > > > > http://allenbrowne.com/ser-51.html
Nathan Lars - 11 Jan 2008 23:12 GMT
Yes it shows exactly as you described. Below was copied straight from file
downloaded from Allen's site.
See anything wrong?
...
Option Compare Database
Option Explicit
'Calendar form variable:
Public gtxtCalTarget As TextBox 'Text box to return the date from the
calendar to.
Public Function CalendarFor(txt As TextBox, Optional strTitle As String)
'On Error GoTo Err_Handler
'Purpose: Open the calendar form, identifying the text box to return
the date to.
'Arguments: txt = the text box to return the date to.
' strTitle = the caption for the calendar form (passed in
OpenArgs).
Set gtxtCalTarget = txt
DoCmd.OpenForm "frmCalendar", windowmode:=acDialog, OpenArgs:=strTitle
Exit_Handler:
Exit Function
Err_Handler:
MsgBox "Error " & Err.Number & " - " & Err.Description, vbExclamation,
"CalendarFor()"
Resume Exit_Handler
End Function
Public Function LogError(lngErr As Long, strDescrip As String, strProc As
String, _
Optional bShowUser As Boolean = True, Optional varParam As Variant)
'Purpose: Minimal substitute for the real error logger function at:
' http://allenbrowne.com/ser-23a.html
If bShowUser Then
MsgBox "Error " & lngErr & ": " & strDescrip, vbExclamation, strProc
End If
End Function
...
> Nathan,
>
[quoted text clipped - 85 lines]
> > > > > >
> > > > > > http://allenbrowne.com/ser-51.html
Daniel Pineault - 11 Jan 2008 23:36 GMT
The question is at the top of your forms module does it begin with
...
Option Compare Database
Option Explicit
'Calendar form variable:
Public gtxtCalTarget As TextBox 'Text box to return the date from the
calendar to.
...
if not, it should!
Have you compacted and repaired your database lately?

Signature
Hope this helps,
Daniel Pineault
If this post was helpful, please rate it by using the vote buttons.
> Yes it shows exactly as you described. Below was copied straight from file
> downloaded from Allen's site.
[quoted text clipped - 129 lines]
> > > > > > >
> > > > > > > http://allenbrowne.com/ser-51.html