Results 1 to 4 of 4

Thread: Simple DateAdd

  1. #1
    Join Date
    Jul 2003
    Location
    South Africa
    Posts
    6

    Simple DateAdd

    Hi guys,

    Can't find anything like this:
    I have calibration intervals and need to calculate a due date:

    Form 'control source'
    [DueDate]=DateAdd("ww",[Cal Freq],[Date]) -

    Cal Freq=weeks and [Date] in usual yyyy-mm-dd format.
    Obviously Access needs a numerical in
    [Cal Freq] 's place.

    Any way to have it use a variable there queried from a column?

    Thanks
    Johan

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    SELECT dateadd("ww",[mycolumn],now) as Duedate from mytable;

  3. #3
    Join Date
    Jul 2003
    Location
    South Africa
    Posts
    6
    Hi,

    Thanks for the reply,

    The answer was to obtain a field list setting instead of columns with:
    SELECT dateadd("ww",[Cal Freq],[Date]) AS [Due Date] FROM [Cal Freq];

    (all fields from a form!) and works perfect.

    I had this as the control source in a 'text box' but find it can only be done with 'combo boxes':

    Is there any way you can disguise a combo box to look like a text box? You can lock it - but can you hide the drop-down lip?

    Regards
    Johan

  4. #4
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    create a combobox and a list box and make it sync each other. and hide one of then which you dont wanna show.

Posting Permissions

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