Results 1 to 5 of 5
  1. #1
    greatwhite is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2019
    Location
    Ottawa, ON
    Posts
    56

    Reset Combox When needed

    In my Header I have some selection criteria when the user clicks on the Boat Combo box it drives the Parts combo box. These are loaded using Rowsource Query in the properties and the row source set to Table/Query



    The criteria than fills the Combo boxes and text boxes in the detail section. which in the properties section they have a control source a query in the Row Source and Row Source Type set Table/Query.

    (PS I didn't build this just inherited it)

    What I would like to do so it's not confusing to the eyes is blank out the data in the Details section every time I select a new boat.

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    8,827
    in the boat afterupdate event, clear the fields:
    if unbound
    Code:
    sub cboBoat_afterupdate()
       me.Name = null
       me.Part = null
       'etc
    end sub


    if BOUND fields, then just run an update query that clears the fields.
    runmacro "mClearFields"

    the macro would turn off setwarnings, then run the append query, then put warnings back on.


  3. #3
    greatwhite is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2019
    Location
    Ottawa, ON
    Posts
    56
    Yeah I tried this and it wouldn't work

    sub cboBoat_afterupdate()
    me.Name = null
    me.Part = null
    'etc
    end sub

    I'm not sure about a macro Update query to clear the fields. I usually use Update Queries to change data in the database table.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    15,503
    Can you post a jpg (s) showing the form and combo etc and show/describe the specific issue(s)?\
    Or post a copy of the database with only a few records to show the issue(s)?

  5. #5
    greatwhite is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2019
    Location
    Ottawa, ON
    Posts
    56
    I'll just keep working on it not sure how else to explain it and cannot really post a picture online as I am not allowed to.

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

Similar Threads

  1. Autofill combox with Year
    By jtan in forum Access
    Replies: 6
    Last Post: 01-05-2018, 02:36 AM
  2. Combox issue
    By Erictsang in forum Queries
    Replies: 3
    Last Post: 08-16-2017, 07:50 AM
  3. Combox list box
    By tmcrouse in forum Forms
    Replies: 2
    Last Post: 04-28-2014, 06:49 PM
  4. Convert combox into text
    By deergirl in forum Access
    Replies: 5
    Last Post: 04-18-2014, 02:16 PM
  5. Combox Box Help
    By BLD21 in forum Reports
    Replies: 3
    Last Post: 09-22-2011, 01:06 PM

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 - Senior Forums