Validation and Popup Calendar

B

Beeyen

Validation and Popup Calendar


I have a popup calendar (compliments of Mr. Allen Browne) which I would like
to use as the only mean to enter the date and time in the adjacent field and
prevent manually entering of any information in the field, other than what is
selected with the popup calendar. Can the Validation rule be a means for
this result can be achieved? The field, from which the popup calendar date
and time is entered, has a control source and name called Date Received. The
calendar code is noted below.

Thanks for the assistance.


Calendar Event Procedure

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:


If bShowUser Then
MsgBox "Error " & lngErr & ": " & strDescrip, vbExclamation, strProc
End If
End Function

On Click
=CalendarFor([Date Recieved],"Calendar")
 
J

Jeanette Cunningham

Hi Beeyen,
an easy way to make users use the calendar is to put a transparent button
over the textbox.
Users will be unable to get to the textbox.
Note that some users might not like this.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
B

Beeyen

Good Day Ma'am,

Thanks you for responding.

I heard of this but could you explain further?

Jeanette Cunningham said:
Hi Beeyen,
an easy way to make users use the calendar is to put a transparent button
over the textbox.
Users will be unable to get to the textbox.
Note that some users might not like this.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


Beeyen said:
Validation and Popup Calendar


I have a popup calendar (compliments of Mr. Allen Browne) which I would
like
to use as the only mean to enter the date and time in the adjacent field
and
prevent manually entering of any information in the field, other than what
is
selected with the popup calendar. Can the Validation rule be a means for
this result can be achieved? The field, from which the popup calendar
date
and time is entered, has a control source and name called Date Received.
The
calendar code is noted below.

Thanks for the assistance.


Calendar Event Procedure

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:


If bShowUser Then
MsgBox "Error " & lngErr & ": " & strDescrip, vbExclamation,
strProc
End If
End Function

On Click
=CalendarFor([Date Recieved],"Calendar")
 
J

Jeanette Cunningham

Create an ordinary command button.
On its property dialog, on the format tab, go to the property called
Transparent and set it to yes.
The command button will become transparent and in form view it is not
visible.
When the user clicks on what they think is the text box for the date,
nothing will happen and then they will use the calendar. Of course some
users would rather type in a date than pick it from a calendar, so it's up
to you how you do it.

Is that the sort of explanation you were asking for?


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


Beeyen said:
Good Day Ma'am,

Thanks you for responding.

I heard of this but could you explain further?

Jeanette Cunningham said:
Hi Beeyen,
an easy way to make users use the calendar is to put a transparent button
over the textbox.
Users will be unable to get to the textbox.
Note that some users might not like this.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


Beeyen said:
Validation and Popup Calendar


I have a popup calendar (compliments of Mr. Allen Browne) which I would
like
to use as the only mean to enter the date and time in the adjacent
field
and
prevent manually entering of any information in the field, other than
what
is
selected with the popup calendar. Can the Validation rule be a means
for
this result can be achieved? The field, from which the popup calendar
date
and time is entered, has a control source and name called Date
Received.
The
calendar code is noted below.

Thanks for the assistance.


Calendar Event Procedure

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:


If bShowUser Then
MsgBox "Error " & lngErr & ": " & strDescrip, vbExclamation,
strProc
End If
End Function

On Click
=CalendarFor([Date Recieved],"Calendar")
 
B

Beeyen

Yes Ma'am

That was excellent! I will give it a try and see how the users respond.

If I may, I have been trying to figure out how to setup Lotus notes mail in
access and while I see a number of questions and what appears to be good
coding, but no one mentions where the coding should be placed, i.e. event
procedures, etc. Would you be willing to assist me with this? I have
address this as a question and either I am redirected to a site or given
coding with little direction.

Let me know or If you do not respond, I understand.

Thanks again and have a nice day.

Jeanette Cunningham said:
Create an ordinary command button.
On its property dialog, on the format tab, go to the property called
Transparent and set it to yes.
The command button will become transparent and in form view it is not
visible.
When the user clicks on what they think is the text box for the date,
nothing will happen and then they will use the calendar. Of course some
users would rather type in a date than pick it from a calendar, so it's up
to you how you do it.

Is that the sort of explanation you were asking for?


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


Beeyen said:
Good Day Ma'am,

Thanks you for responding.

I heard of this but could you explain further?

Jeanette Cunningham said:
Hi Beeyen,
an easy way to make users use the calendar is to put a transparent button
over the textbox.
Users will be unable to get to the textbox.
Note that some users might not like this.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


Validation and Popup Calendar


I have a popup calendar (compliments of Mr. Allen Browne) which I would
like
to use as the only mean to enter the date and time in the adjacent
field
and
prevent manually entering of any information in the field, other than
what
is
selected with the popup calendar. Can the Validation rule be a means
for
this result can be achieved? The field, from which the popup calendar
date
and time is entered, has a control source and name called Date
Received.
The
calendar code is noted below.

Thanks for the assistance.


Calendar Event Procedure

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:


If bShowUser Then
MsgBox "Error " & lngErr & ": " & strDescrip, vbExclamation,
strProc
End If
End Function

On Click
=CalendarFor([Date Recieved],"Calendar")
 
J

Jeanette Cunningham

I don't have any experience with setting up Lotus notes in access.
It is best to have a specific question if you want to get a helpful answer.
General questions are too hard to answer.
I suggest you pick a couple of lines of the coding you have been given and
ask a question about which event it should go on.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


Beeyen said:
Yes Ma'am

That was excellent! I will give it a try and see how the users respond.

If I may, I have been trying to figure out how to setup Lotus notes mail
in
access and while I see a number of questions and what appears to be good
coding, but no one mentions where the coding should be placed, i.e. event
procedures, etc. Would you be willing to assist me with this? I have
address this as a question and either I am redirected to a site or given
coding with little direction.

Let me know or If you do not respond, I understand.

Thanks again and have a nice day.

Jeanette Cunningham said:
Create an ordinary command button.
On its property dialog, on the format tab, go to the property called
Transparent and set it to yes.
The command button will become transparent and in form view it is not
visible.
When the user clicks on what they think is the text box for the date,
nothing will happen and then they will use the calendar. Of course some
users would rather type in a date than pick it from a calendar, so it's
up
to you how you do it.

Is that the sort of explanation you were asking for?


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


Beeyen said:
Good Day Ma'am,

Thanks you for responding.

I heard of this but could you explain further?

:

Hi Beeyen,
an easy way to make users use the calendar is to put a transparent
button
over the textbox.
Users will be unable to get to the textbox.
Note that some users might not like this.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


Validation and Popup Calendar


I have a popup calendar (compliments of Mr. Allen Browne) which I
would
like
to use as the only mean to enter the date and time in the adjacent
field
and
prevent manually entering of any information in the field, other
than
what
is
selected with the popup calendar. Can the Validation rule be a
means
for
this result can be achieved? The field, from which the popup
calendar
date
and time is entered, has a control source and name called Date
Received.
The
calendar code is noted below.

Thanks for the assistance.


Calendar Event Procedure

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:


If bShowUser Then
MsgBox "Error " & lngErr & ": " & strDescrip, vbExclamation,
strProc
End If
End Function

On Click
=CalendarFor([Date Recieved],"Calendar")
 

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