Results 1 to 8 of 8

Thread: date format problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    6

    Angry date format problem

    hi,

    I have a continuous form with text boxes displaying dates. They show as dates untill they are clicked on in which case they show times. The format of the text boes are set to short date as is the format in the table. The datatype is datetime.

    Any ideas?

    What would be useful though is if you can tell me how I can use a date picker control in a continuous form.

    Thanks,
    Last edited by steveman2000; Aug 4th, 2005 at 09:38 AM.

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: date format problem

    If I remember correctly, any control set in the detail section of the continuous form is replaced, although some controls have, uh difficulty because they are duplicated.

    Question:
    Do you really need continuous forms?
    Use the format property in the sql statement/filter and on the textboxes?
    Use a format property on the tables?
    Rethink how you display the dataa to the users

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    6

    Re: date format problem

    ok im looking into the other suggests in ur questions section.

    but btw wat do u mean by getting replaced & some getting duplicated!?!??

  4. #4

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    6

    Re: date format problem

    yes i need continuous forms, the format short date thing is set everywhere, and i've just tried a format(EstDate, "dd/mm/yyyy") in teh sql thing. yes it displays the right format. It does then go onto the time when u click in it. But you cant now update it .

  5. #5
    Lively Member
    Join Date
    May 2005
    Location
    derby, uk
    Posts
    83

    Re: date format problem

    try setting the format within the control, it doesn't care what its showing unless it *knows* not to you get the full date/time thing when the control has the focus.. it behives the rest of the time.

    continuous forms should not affect this.

    its textbox.format = "dd\/mm\/yyyy" that *should* sort this out. forget filtering the source data, though you can do that as well.. also you could set an input mask which will certainly stop this problem, though i find them annoying

  6. #6

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    6

    Unhappy Re: date format problem

    I've already mentioned that I've set the format in the control to short date. This obviously didnt help. I've jsut tried setting the format (via the propertise window) to what you put in your post. I tried with and without the quotes and neither worked .

    I've asked lots of people and they all seem to be suggesting basicly the same things. None of which work .

  7. #7
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: date format problem

    you could use the Split function and split the date and time apart..so you ensure only the date is shown in the textbox..

    VB Code:
    1. Dim strDate() as String
    2. Dim finalDate as String
    3.  
    4. strDate = Split(textbox1.text," ")
    5. finalDate = strDate(0)

    Would set finalDate to = ##/##/#### if the date is in a format of

    "08/08/2005 12:45PM"

    HTH

  8. #8

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    6

    Re: date format problem

    Hey nice idea. But how do I update a single control on a continuous form without updating all of them?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width