Results 1 to 3 of 3
  1. #1
    McArthurGDM is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    215

    Setting Text Boxes on Form to Initial Blank Value Until Selection is Made?

    Hi,

    I have a form that is bound to a table. On this form is a dropdown to select a specific record. I want every other control linked to this table to show as blank until an initial selection is made in the drop down. How do I do this?

    Thanks,

  2. #2
    nick404's Avatar
    nick404 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2015
    Location
    Wisconsin
    Posts
    352
    In the properties for the other fields click on the data tab. Have Row Source Type set to "table/query" and click the three dots on the field above (Row Source). Will take you to a query builder.
    Use an SQL like this one, with your table, field, form, and combo box names
    Code:
    SELECT tblName.field1FROM tblName
    WHERE (((tblName.field2)=[Forms]![formName].[comboboxName]))
    GROUP BY tblName.field1;
    Field 2 is the field that populates the main combo box. Field 1 is the field that you want contingent on the combo box (i.e. the one that you are editing the property for).
    Hope this helps...

  3. #3
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,839
    couple of options

    1. change the form dataentry property to true
    2. in your combo after update event, put code to change it to false - and probably the code in 2 below

    or

    1. put in the form filter property [ID]=0 and save the form - substitute the name of your autonumber field for ID. Alternatively put this code in the form open event
    Code:
    me.filter="[ID]=0"
    me.filteron=true
    2. in the combo afterupdate event put

    Code:
    me.filter="[ID]=" & me.comboname
    me.filteron=true

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

Similar Threads

  1. Replies: 10
    Last Post: 01-31-2014, 09:47 AM
  2. Replies: 2
    Last Post: 09-10-2013, 09:10 AM
  3. Initial form not blank
    By tcgl in forum Forms
    Replies: 2
    Last Post: 08-09-2012, 10:13 PM
  4. Replies: 4
    Last Post: 02-14-2011, 09:11 AM
  5. Replies: 0
    Last Post: 12-02-2010, 11: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