A little more help with calender control 10.0

Justchris

Registered User.
Local time
Today, 00:29
Joined
Feb 22, 2005
Messages
24
Ok, I have my table set up with the date as the primary key. I have a form set up for the table. So far I have the switchboard open the calender control... I have a button on the calender control form to open the correct form for inputing daily numbers. I would like to use the calenders selected date and have that input into the date field on my form. This in turn should create a record using the calenders selected date. I know its going to be an onclick event. I just dont know the code.

Also.. Is it possible to pull up a form using the same method for a previous day if the record already exists for that particular date?

Thanks
Chris :D
 
"Ok, I have my table set up with the date as the primary key."

no.
 
lol, we'll should i set up a table with an autonumber as the primary key then just use a date as the second record or something? I'm a newb here :rolleyes:

*edit*
I was doing some reading on another site and I found some pretty good info which sort of got me in the right direction. I will be using autonumbers as my primary key then I will set me date using indexed yes - no duplicates. Trying to teach yourself database design from the ground up with no previous knowledge of databases is a pretty complicated task.

I would still like to use a calender on this project though. I would like to select a date.. Open a form with the date selected as the date in the date field. If the date already exists I would like it to pull up the records for the selected date in form view.

Anyway.. Thanks for baring with me ;)
 
Last edited:
This is a pretty good question.. the calender control 11.0 ms access 2003 provides is a very nice little addition to what im working on. Ive searched and searched to no avail untill now. The calender control does not provide an update on click. You have to manually enter the code for the on click event.

Private Sub Calendar_Click()
Me.NameOfTextBoxControl.Value = Me.Calendar.Value
End Sub

You have to have a hidden or non hidden textbox on your form to store the info and the nameoftextboxcontrol needs to be changed in context. Also this assumes your activex control is named calender.

hope this helps anyone else looking for info on calender control 11.0 :D
 
If you want, upload your database (zip it), and I can have a peek at it and see if there should be any changes.

Up to you.
 
Sure, you can take a look... It still needs a lot of work of course. Dont laugh at it.. lol its a work in progress. The fulltable table is the main table.. And then the newtab is the main form.

Thanks for taking a look, Any help would be awesome
Chris :cool:
 

Attachments

if anyone else wanted to take a look and make any suggestions IM all ears :p
 

Users who are viewing this thread

Back
Top Bottom