Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2005
    Posts
    1

    Unanswered: Form field default value from unlinked table

    Hi all,

    Hope you are well in this very cold new year (Dublin, Ireland).

    I have a table set up, called Work Date , with a field called Work Date, default value set to
    Code:
    Format(Now(), "dd/mm/yyyy")
    .

    I have an Autoexec macro set up, so that it opens up a form that has been created based on this table, so that the user can insert a date, either accepting the default or entering a new one.

    However, I have also a new form based on another table (no relationships defined yet), called Data Entry, which has a Date field.

    What I want to do is have this Date field default to the value in the Work Date table's Work Date field, but also to remain editable.

    Do I need to use the Before Insert event? I have tried this with

    Code:
    Me.[Date] = [Work Date]![Work Date]
    but it reports errors.

    What else can I do?

    Thanks in advance for anyone's help....

    Datalore

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926

    Error

    At first glance, it looks like your missing the word "Forms".

    Ex:

    me!WorkDate = Forms!OtherForm!WorkDate

    Also, try not using the key word "Date" in your control's name and you'll save yourself some headaches if you don't use spaces (then you don't have to use brackets.)

Posting Permissions

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