Results 1 to 4 of 4
  1. #1
    leah7au is offline Novice
    Windows XP Access 2007
    Join Date
    May 2009
    Posts
    2

    update default value in form

    Hi All
    This question is probably quite simple but i cant seem to work out the syntax.


    I have a customer details form for entering new data into the customer table. I want to be able to add the record to the table and when you click add extra details it opens a new form for adding the extra details assiciated with the customer. I can do all of the above but I would like the new form to have the customer that was just entered as the defualt value on the new form. The customer ID is the primary key in the customer table and I would like to carry the customer id into the new form as the default value to add the extra details instead of having to scroll through to selct the customer from a drop down box

    thankx in advance

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    How about using the WhereCondition argument of the OpenForm command to put a filter on the next form?

  3. #3
    leah7au is offline Novice
    Windows XP Access 2007
    Join Date
    May 2009
    Posts
    2

    whereCondition

    would that be a macro on the openForm event. I am having a problem with the syntax refering to the forms i.e me.fieldName = openFormaname.fieldname.value

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You need to add a WhereCondition to the macro that is opening the new form. Do you know how to look at that macro? Can you modify it?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 10-30-2013, 11:42 AM
  2. Update Query from Form
    By ste_pie87 in forum Queries
    Replies: 2
    Last Post: 04-26-2009, 07:22 PM
  3. Replies: 1
    Last Post: 01-04-2008, 11:40 AM
  4. Update table from calculated field in a form
    By BernardKane in forum Forms
    Replies: 3
    Last Post: 11-28-2006, 09:48 AM
  5. Form/Subform - Update control help!
    By f_ali in forum Forms
    Replies: 2
    Last Post: 02-26-2006, 12:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums