none
Access Forms + filter RRS feed

  • Question

  • Hi,

    I am new to Access forms. My background is in c# and asp.net. I got a task to create access form using linked table to SQL Server table. Linked table is used by different forms. One of the form requires data to be filtered when form loads. Then form should display as split form showing data in data sheet view and allowing edits for records and add new record on to the form.

    Please let me know how to filter data. I tried using design view and going into property sheet and setting filter property to

    "[TableName].[ColumnName ]= 'xxxx'" and setting 'Filter On Load' property to 'Yes'. When I go to form view, I am seeing all the records from table and data is not filtered.

    These are the things I need on my form

    1. Link to SQL Server Table
    2. On the Form Make couple of fields as combo boxes and populate it with values. When scrolling happens in data sheet view and record is shown on form, that column should be selected from list of values available.
    3. On form load data should be filtered.
    4. User should be able to add new records to the table

    I appreciate your response.

    Friday, May 5, 2017 3:34 PM

Answers

  • Hi,

    Is the filter going to be a constant value? If so, you can go to the form's Record Source property and apply the filter in the SQL statement. Or, you can create a query with the required criteria and use the query as the form's Record Source.

    Hope it helps...

    • Marked as answer by Spunny Friday, May 5, 2017 3:48 PM
    Friday, May 5, 2017 3:39 PM

All replies

  • Hi,

    Is the filter going to be a constant value? If so, you can go to the form's Record Source property and apply the filter in the SQL statement. Or, you can create a query with the required criteria and use the query as the form's Record Source.

    Hope it helps...

    • Marked as answer by Spunny Friday, May 5, 2017 3:48 PM
    Friday, May 5, 2017 3:39 PM
  • Yes. It is constant value. Thank You. It worked.
    Friday, May 5, 2017 3:48 PM
  • Hi,

    You're welcome. Glad to hear you got it to work. Good luck with your project.

    Friday, May 5, 2017 4:05 PM