PC Review


Reply
Thread Tools Rate Thread

datetime field display

 
 
xbound
Guest
Posts: n/a
 
      25th May 2010
Have a form with a table as Record Resource. There's a datetime field in
the table which I would like to break down programmatically and display in
two unbound controls: a "hour" combo box and a "minute" combo box. If the
user selects other values in the combos, I would like to update the datetime
field accordingly. I prefer not having the user to touch the date portion
of the datetime field.

What's the "proper" way to implement this? Do I need to initiate another
read of the record to populate the unbound combos? If so at what point
(event) should I do that? Thanks for any advice.


Using: Access 2007, SQL Server 2000

 
Reply With Quote
 
 
 
 
Jeff Boyce
Guest
Posts: n/a
 
      26th May 2010
A suggestion before you proceed any further ...

Consider using a query against that table as your data source for the form.
This would give you a way to use only portions of the table and/or modified
portions (e.g., your time-only info).

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"xbound" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Have a form with a table as Record Resource. There's a datetime field
> in the table which I would like to break down programmatically and display
> in two unbound controls: a "hour" combo box and a "minute" combo box. If
> the user selects other values in the combos, I would like to update the
> datetime field accordingly. I prefer not having the user to touch the
> date portion of the datetime field.
>
> What's the "proper" way to implement this? Do I need to initiate another
> read of the record to populate the unbound combos? If so at what point
> (event) should I do that? Thanks for any advice.
>
>
> Using: Access 2007, SQL Server 2000



 
Reply With Quote
 
 
 
 
golfinray
Guest
Posts: n/a
 
      27th May 2010
What I do for a date stamp is put a field in my table called Last_Updated.
Then a textbox with the control source of Last_Updated. Then I will put a
command button for the users to save thier changes and in the onclick of the
button I put:
Me.last_updated=Now()
You may have to change that around for minutes and hours if you want to
record those.
--
Milton Purdy
ACCESS
State of Arkansas


"xbound" wrote:

> Have a form with a table as Record Resource. There's a datetime field in
> the table which I would like to break down programmatically and display in
> two unbound controls: a "hour" combo box and a "minute" combo box. If the
> user selects other values in the combos, I would like to update the datetime
> field accordingly. I prefer not having the user to touch the date portion
> of the datetime field.
>
> What's the "proper" way to implement this? Do I need to initiate another
> read of the record to populate the unbound combos? If so at what point
> (event) should I do that? Thanks for any advice.
>
>
> Using: Access 2007, SQL Server 2000
>
> .
>

 
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
Inserting C# datetime milliseconds into sql Server DateTime tk042383 Microsoft ADO .NET 2 4th May 2004 04:28 PM
NASTY Bug in handling of DateTime.MaxValue and DateTime.MinValue =?Utf-8?B?YmlsbF83Nw==?= Microsoft Dot NET Framework 2 31st Mar 2004 06:43 PM
Convert datetime to System.DateTime Martin Schmid Microsoft ADO .NET 1 24th Feb 2004 09:52 PM
converting Unix datetime count to .Net DateTime object Mark Worrall Microsoft Dot NET Framework 2 13th Feb 2004 06:52 PM
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. luna Microsoft ASP .NET 1 13th Feb 2004 02:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:08 AM.