PC Review


Reply
Thread Tools Rate Thread

Calendar select date record

 
 
Smiles
Guest
Posts: n/a
 
      1st Dec 2006
Good day

I have a Access database with a record for each day of the year each
records has about 130 data elements

From this I have created 12 forms which contain the relative data elements

I would like to place the default calendar at the top of each form
click on a day on the calendar had have the form bring up that days
records so the can be updated or verified
can you tell me where to start

thanks

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Rkw=?=
Guest
Posts: n/a
 
      2nd Dec 2006
Why don't you base your form records on a query that will prompt user to
enter a date window for the date field you choose. Then the form will open
only showing records in the specified date window.
--
FL


"Smiles" wrote:

> Good day
>
> I have a Access database with a record for each day of the year each
> records has about 130 data elements
>
> From this I have created 12 forms which contain the relative data elements
>
> I would like to place the default calendar at the top of each form
> click on a day on the calendar had have the form bring up that days
> records so the can be updated or verified
> can you tell me where to start
>
> thanks
>
>

 
Reply With Quote
 
JK
Guest
Posts: n/a
 
      2nd Dec 2006
Smillie ,

insert the Calendar Control as, say ,"MyCalendar" anywhere on you form and
use the On Current event:

+++++++++
Private Sub Form_Current()

If IsNull(Me.SomeDate) Then

With Me.MyCalendar
.Year = Year(Date)
.Month = Month(Date)
.Value = Date
End With

Else

With Me.MyCalendar
.Year = Year(Me.SomeDate)
.Month = Month(Me.SomeDate)
.Value = Me.SomeDate
End With

End If

End Sub
++++++

'(you cannot use an IF statement *inside* a With statement)

If you want to change the date using the calendar, eg clicking on a date on
your Calendar control, use the After Update event of the Calendar:

++++++

Private Sub MyCalendar_AfterUpdate()

Me.SomeDate=Me.MyCalendar.Value

End Sub

+++++

Regards/JK






"Smiles" <(E-Mail Removed)> wrote in message
news:fp0ch.18737$(E-Mail Removed)...
> Good day
>
> I have a Access database with a record for each day of the year each
> records has about 130 data elements
>
> From this I have created 12 forms which contain the relative data elements
>
> I would like to place the default calendar at the top of each form
> click on a day on the calendar had have the form bring up that days
> records so the can be updated or verified
> can you tell me where to start
>
> thanks
>



 
Reply With Quote
 
Smiles
Guest
Posts: n/a
 
      3rd Dec 2006
Smiles wrote:
> Good day
>
> I have a Access database with a record for each day of the year each
> records has about 130 data elements
>
> From this I have created 12 forms which contain the relative data elements
>
> I would like to place the default calendar at the top of each form
> click on a day on the calendar had have the form bring up that days
> records so the can be updated or verified
> can you tell me where to start
>
> thanks
>

Thank you for the advise but I only have these options to set a value of
the date

on update
on enter
on exit
on get focus
on lost focus

where do I put your code

thanks
 
Reply With Quote
 
JK
Guest
Posts: n/a
 
      4th Dec 2006
Opps Smiles, my fault.

On Exit should do it.

Regards
Jacob




"Smiles" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Smiles wrote:
>> Good day
>>
>> I have a Access database with a record for each day of the year each
>> records has about 130 data elements
>>
>> From this I have created 12 forms which contain the relative data
>> elements
>>
>> I would like to place the default calendar at the top of each form
>> click on a day on the calendar had have the form bring up that days
>> records so the can be updated or verified
>> can you tell me where to start
>>
>> thanks
>>

> Thank you for the advise but I only have these options to set a value of
> the date
>
> on update
> on enter
> on exit
> on get focus
> on lost focus
>
> where do I put your code
>
> thanks



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to select record based on date Ann Scharpf Microsoft Access Queries 5 30th Sep 2009 05:49 PM
Using a calendar to select a record for a specific date =?Utf-8?B?SnVsaWEgU21pdGg=?= Microsoft Access 0 11th Sep 2006 01:51 PM
Select Most Recent Date for Record =?Utf-8?B?VCBN?= Microsoft Access Queries 3 2nd May 2005 07:19 PM
Select record with most current date =?Utf-8?B?VGFtbXk=?= Microsoft Access Queries 2 7th Oct 2004 10:35 PM
How to select a Record having closer Date Mota Microsoft Access Form Coding 4 12th Jul 2003 07:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:49 PM.