datetime field display

Discussion in 'Microsoft Access Form Coding' started by xbound, May 25, 2010.

  1. xbound

    xbound Guest

    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
     
    xbound, May 25, 2010
    #1
    1. Advertisements

  2. xbound

    Jeff Boyce Guest

    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" <> wrote in message
    news:...
    > 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
     
    Jeff Boyce, May 26, 2010
    #2
    1. Advertisements

  3. xbound

    golfinray Guest

    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
    >
    > .
    >
     
    golfinray, May 27, 2010
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    0
    Views:
    179
    Guest
    Nov 29, 2004
  2. Guest

    Search 1st field and display corresponding 2nd field....

    Guest, Jun 6, 2005, in forum: Microsoft Access Form Coding
    Replies:
    3
    Views:
    207
    Rick B
    Jun 6, 2005
  3. Replies:
    1
    Views:
    156
    Marshall Barton
    Nov 7, 2005
  4. Replies:
    7
    Views:
    1,912
  5. iccsi

    datetime picker reset datetime after disable

    iccsi, Sep 4, 2008, in forum: Microsoft Access Form Coding
    Replies:
    0
    Views:
    361
    iccsi
    Sep 4, 2008
Loading...

Share This Page