Refresh data in a continous form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AccessHunter
    New Member
    • Nov 2007
    • 77

    Refresh data in a continous form

    Hi,

    I have a continous form that displays Name and Address of Suppliers.
    In the form there is a combo box for 'Active Address' and 10 other text boxes. All the fields coem from one table, "Primary Suppliers".
    The combobox is for 'Active Address' with values 'Yes' and 'No'.Control source of the form is,
    Select * from PrimarySupplier s where [ActiveSupplier]="Yes". I want the form to display only the Suppliers who has 'Active address' = "Yes".If user selects "No" in the combobox for a supplier I want the form to refresh and not show that particular supplier record in the continous form.

    Please treat this as urgent and help me solve this.

    Thanks
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    You need Me.Requery not Refresh. Place it in the AfterUpdate event of the combobox. But why in the world would you use a combobox for a simple Yes/No answer, instead of a checkbox?

    Linq ;0)>

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32634

      #3
      Are [Active Address] and [ActiveSupplier] two separate fields in the table. If so then a better explanation is called for. If not, then such carelessnes will waste time.

      Either way, you don't ask the question in a way likely to allow speedy resolution.

      PS. With full and clear information this is quickly and easily answered I'm sure.

      Comment

      • missinglinq
        Recognized Expert Specialist
        • Nov 2006
        • 3533

        #4
        Good catch, Ade! I missed what I assume is a typo, but, of course, doesn't have to be!

        Linq ;0)>

        Comment

        • AccessHunter
          New Member
          • Nov 2007
          • 77

          #5
          Hi,

          Thanks for the replies. Sorry if I confused you, ActiveAddress and ActiveSupplier is the same field.

          Thanks

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32634

            #6
            You have a single field with two names! Are you sure?

            Perhaps you could provide some meta-data info to help clarify this situation as I'm surely confused.

            This will work much better if you can post the meta-data (info about the layout / structure) of the table in the same way as I use in my example. Click on the Reply button and you will have access to all the codes I've used. PK & FK stand for Primary Key & Foreign Key respectively. Please don't use any TABs in your formatted layout as this will not display correctly - Spaces only for layout.
            Table Name=[tblStudent]
            Code:
            [I]Field           Type        IndexInfo[/I]
            StudentID       AutoNumber  PK
            Family          String      FK
            SName           String
            University      String      FK
            Mark            Numeric
            LastAttendance  Date/Time

            Comment

            Working...