Validation Rule For List Box In A Table

  • I think I have a fairly simple problem. I am wanting the user to only be able to choose data from the list box in the table.


    Table 1 has a list of departments
    Table 2 has a list box connected to table 1.
    I want the user to only be able to enter a field from the list box (if the department exists in table 1)


    Can I just do this with the valadation Rule? Is this syntax correct?
    = [Table 1]![departments]


    Thanks for the help
    Jason

  • Re: Validation Rule For List Box In A Table


    Maybe Im not doing it right.
    I am using Row Source to select the table. The List Box shows the correct information, but the user can type anything in the column. I want the user to only be able to select data from the list box.

  • Re: Validation Rule For List Box In A Table


    yes, I'll be running a query. The main purpose is to only have relevant data. I have several "correct" tables. And then several tables that look at these correct tables to get certain data. I hope this is making since.
    Thanks

  • Re: Validation Rule For List Box In A Table


    if you've set up the list box correctly the user shouldn't be able to change any of the data in the list box?

  • Re: Validation Rule For List Box In A Table


    It's not a validation rule.


    Your Listbox will have a RowSource property. Here you write your SQL to limit the available options, i.e.


    Quote

    SELECT tblCountries.CountryID, tblCountries.CountryName FROM tblCountries ORDER BY [CountryName];


    Yoru rowsource type will also need to be Table/Query as opposed to Value List or Field List. The Validation Rule property is left blank.

  • Re: Validation Rule For List Box In A Table


    I tryed this:
    No validation rule
    Display Control: List Box
    Row Source Type: Table/ Query
    Row Source: SELECT [List Dept].[Dept #] FROM [List Dept];
    Bound Column: 1
    Column Count 1


    It still allows the user to type in any value in the Dept # field.
    thanks again

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!