Results 1 to 5 of 5
  1. #1
    cbuechner is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Jan 2021
    Posts
    60

    Default values

    I am trying to make sure I am doing my homework prior to asking any question.



    IM just going to ask a basic capability question. Is it possible to get the default value from a different table in table design mode?

  2. #2
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi
    If you need to get a value from another table then you would need to set the DataType of the Field to a Number, Long Integer

    Then on the Form that is bound to the Table you would create a Combobox to Lookup the values from the other table.
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  3. #3
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,792
    Is it possible to get the default value from a different table in table design mode?
    Strictly speaking, pretty sure the answer is no.
    you would need to set the DataType of the Field to a Number
    Why? Default can be text too.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,114
    Not in table design but it is trivial in a form bound to the table. If you really need to do it in a table I believe you can achieve that using a data macro AfterInsert to call a custom VBA function (in which you can get the values from the other table using simple dLookups).
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  5. #5
    apr pillai's Avatar
    apr pillai is offline Competent Performer
    Windows 10 Access 2007
    Join Date
    May 2010
    Location
    Alappuzha, India
    Posts
    209
    If you go for the Combobox or Listbox Options then you can do it in the Table design time itself. The Table Field Property Sheet have two tabs, the second one is the Lookup Tab. On the Lookup Tab we have the ListBox and Combobox Options besides the default TextBox.

    If the Default value is a Constant then we can assign it on the General Tab itself.

    I know these things are not anything new, just thought of refreshing my memory.

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

Similar Threads

  1. default property values
    By Gili in forum Forms
    Replies: 3
    Last Post: 03-22-2017, 10:42 AM
  2. Form Default Values
    By McArthurGDM in forum Forms
    Replies: 1
    Last Post: 10-21-2015, 10:18 AM
  3. Different default values for different forms
    By pshoestir in forum Forms
    Replies: 7
    Last Post: 08-27-2015, 06:44 PM
  4. default values in a form
    By kmims44 in forum Forms
    Replies: 9
    Last Post: 06-28-2012, 12:35 PM
  5. Default Values
    By twainscott in forum Programming
    Replies: 0
    Last Post: 09-14-2006, 11:18 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