473,405 Members | 2,261 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Pop up calendar error.

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
6 1946
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
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

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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mark A. Washburn | last post by:
The Julian Calendar, adopted in 46BC by Julius Caesar, adds one day every four years to correct for the fact that Earth's solar year is slightly more than 365 of Earth's daily rotations. ( 365.25...
7
by: Shuffs | last post by:
Could someone, anyone please tell me what I need to amend, to get this function to take Sunday as the first day of the week? I amended the Weekday parts to vbSunday (in my code, not the code...
1
by: jacob henson | last post by:
I have a user control with a calendar in it. when my main page load with the calendar in it. the page has a java script error. also if you try to use the calendar it give a java script error. ...
5
by: Ben | last post by:
I have a javascript code in the ASP.NET page. I want to access Calendar control that is inside ASP page and is "run at server". I try to use following code but it doesn't work. <script...
0
by: GV | last post by:
Hi all, New to developing in VS 2005 ASP 2.0 Trying to have a easy pop calender for a button on a web page. I keep getting a error message in IE6 that says: Line 69 Char 3 Error:...
0
by: jphelan | last post by:
After opening and clicking on the popup calendar command control button, "fdlgCal"; I click on a given date. The date is suppose to then appear in a date field next to the control. Instead, I get...
3
by: thorpk | last post by:
I posted this problem earlier in the month and some one decided it was better to change the subject and ask a completely different question. I am therefore reposting. I am hoping some one can...
0
by: mathewgk80 | last post by:
HI all, I am having popup calendar Javascript code. But i dont know how it is connecting to asp.net code.. I am using asp.net,c#.net and also using 3tier architecture with master page.... I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.