By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,188 Members | 834 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,188 IT Pros & Developers. It's quick & easy.

Pop up calendar error.

P: n/a
I have an access database that i have added a pop up calendar to, the
Table information for the Date Reported field is
Date/Time
format short date,
input mask is 00/00/0000.

i have created a combo box on the form and have bound the control to
the Date Reported field. I have placed the calendar control on the
form and set the Visible property to no.
The following code has bee added to the Mouse Down Event of the Date
Reported combo box.

Private Sub Date_Reported_MouseDown(Button As Integer, Shift As
Integer, X As Single, Y As Single)
' show calendar and set date
Calendar.Visible = True
Calendar.SetFocus
End Sub

The folowing code has been added to the Click event for the calendar
control.

Private Sub Calendar_Click()
' Set Date reported to selected date and hide calendar
Date_Reported.Value = Calendar.Value
Date_Reported.SetFocus
Calendar.Visible = False

End Sub

When i go back to the form and click on the combo box control i
receive an error stating. "The value you have entered isn't valid for
this field." This is displayed twice before showing the calendar. I am
able to clcik on a date in the calendar and it si then displayed int
he combo box control.

I am at a loss to fix this.
Please advise.
Thanks
Karl

May 14 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Hi,

Is there a way in Access to retrieve data in a specific area of a text file?
The data ( a 6 character date in YYMMDD format ) always resides on the
second line in positions 11 to 16. Thank you in advance for you help.
May 14 '07 #2

P: n/a
On Mon, 14 May 2007 14:00:20 GMT, fh***@aol.com wrote:
Hi,

Is there a way in Access to retrieve data in a specific area of a text file?
The data ( a 6 character date in YYMMDD format ) always resides on the
second line in positions 11 to 16. Thank you in advance for you help.
Function dateOfcostumtextfile(Pathname)
Dim line$, fh%
fh = FreeFile()
Open Pathname For Input As #fh
Input #fh, line
Input #fh, line
Close #fh
dateOfcostumtextfile = DateSerial( _
val(Mid$(line, 11, 2)), _
val(Mid$(line, 13, 2)), _
val(Mid$(line, 15, 2)))
End Function

--
Regards
Benny Andersen
May 14 '07 #3

P: n/a

On 14-May-2007, Benny Andersen <a.*********@gmail.comwrote:
Function dateOfcostumtextfile(Pathname)
Dim line$, fh%
fh = FreeFile()
Open Pathname For Input As #fh
Input #fh, line
Input #fh, line
Close #fh
dateOfcostumtextfile = DateSerial( _
val(Mid$(line, 11, 2)), _
val(Mid$(line, 13, 2)), _
val(Mid$(line, 15, 2)))
End Function
Thank you, it works perfect
May 14 '07 #4

P: n/a
On May 14, 10:48 am, f...@aol.com wrote:
On 14-May-2007, Benny Andersen <a.mail.u...@gmail.comwrote:
Function dateOfcostumtextfile(Pathname)
Dim line$, fh%
fh = FreeFile()
Open Pathname For Input As #fh
Input #fh, line
Input #fh, line
Close #fh
dateOfcostumtextfile = DateSerial( _
val(Mid$(line, 11, 2)), _
val(Mid$(line, 13, 2)), _
val(Mid$(line, 15, 2)))
End Function

Thank you, it works perfect
PERFECTLY! :)

May 14 '07 #5

P: n/a
On May 14, 10:53 am, DavidB <j...@yahoo.comwrote:
On May 14, 10:48 am, f...@aol.com wrote:


On 14-May-2007, Benny Andersen <a.mail.u...@gmail.comwrote:
Function dateOfcostumtextfile(Pathname)
Dim line$, fh%
fh = FreeFile()
Open Pathname For Input As #fh
Input #fh, line
Input #fh, line
Close #fh
dateOfcostumtextfile = DateSerial( _
val(Mid$(line, 11, 2)), _
val(Mid$(line, 13, 2)), _
val(Mid$(line, 15, 2)))
End Function
Thank you, it works perfect

PERFECTLY! :)- Hide quoted text -

- Show quoted text -
I would like some one to be able to provide any assistance to the
first question posed.

May 17 '07 #6

P: n/a
On May 17, 3:49 am, "tho...@gmail.com" <tho...@gmail.comwrote:
On May 14, 10:53 am, DavidB <j...@yahoo.comwrote:


On May 14, 10:48 am, f...@aol.com wrote:
On 14-May-2007, Benny Andersen <a.mail.u...@gmail.comwrote:
Function dateOfcostumtextfile(Pathname)
Dim line$, fh%
fh = FreeFile()
Open Pathname For Input As #fh
Input #fh, line
Input #fh, line
Close #fh
dateOfcostumtextfile = DateSerial( _
val(Mid$(line, 11, 2)), _
val(Mid$(line, 13, 2)), _
val(Mid$(line, 15, 2)))
End Function
Thank you, it works perfect
PERFECTLY! :)- Hide quoted text -
- Show quoted text -

I would like some one to be able to provide any assistance to the
first question posed.- Hide quoted text -

- Show quoted text -
I revistied my database and no longer have errors on my database popup
calendar.

May 21 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.