PC Review


Reply
Thread Tools Rate Thread

Date button to a Subform

 
 
Simon
Guest
Posts: n/a
 
      11th Nov 2006
I have a form which has as Datasheet sub form in it. On the datasheet
subform there is a colum that has a fied for a date. Is it posible to
have a click button on the main form that will but todays date inot the
data field on the subform.

I was not sure how to code this as i want to put it in a subform


Can help would be great

Simon

 
Reply With Quote
 
 
 
 
Al Campagna
Guest
Posts: n/a
 
      11th Nov 2006
Simon,
Try using the DblClick of the subform YourDateField to update it to today's date.
Private Sub YourDateField_DblClick(Cancel As Integer)
YourDateField = Date
End Sub

No need to use up main form real estate with a button just for adding a date.

Minor point... you can always create a continuous subform that looks just like a
datasheet view. That way you have better control over your objects, colors, headers and
footers, labels, etc...
--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

"Simon" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a form which has as Datasheet sub form in it. On the datasheet
> subform there is a colum that has a fied for a date. Is it posible to
> have a click button on the main form that will but todays date inot the
> data field on the subform.
>
> I was not sure how to code this as i want to put it in a subform
>
>
> Can help would be great
>
> Simon
>



 
Reply With Quote
 
Van T. Dinh
Guest
Posts: n/a
 
      11th Nov 2006
Is it on a new Record in the Subform like CreatedDate?

If that's the case, you can simply set the Default Property of the Field (in
the source Table) or the Control (on the Subform) to Date().

--
HTH
Van T. Dinh
MVP (Access)



"Simon" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a form which has as Datasheet sub form in it. On the datasheet
> subform there is a colum that has a fied for a date. Is it posible to
> have a click button on the main form that will but todays date inot the
> data field on the subform.
>
> I was not sure how to code this as i want to put it in a subform
>
>
> Can help would be great
>
> Simon
>



 
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
main form/subform/command button for another subform =?Utf-8?B?U2hhcm9u?= Microsoft Access Forms 11 19th Jun 2007 08:15 PM
subform/subform expand details button =?Utf-8?B?ZGNobWFu?= Microsoft Access Form Coding 0 8th Sep 2006 06:19 PM
Find A Date Value In A Subform From Another Subform's Date Field Value Bill (Unique as my name) Microsoft Access Form Coding 7 17th Jul 2006 05:58 PM
Hide Subform from Command button in Subform Wayne Microsoft Access Forms 0 24th May 2006 01:19 PM
set focus to subform in subform from main form button msmuzila@gmail.com Microsoft Access Forms 1 25th Dec 2005 05:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:12 AM.