I have a query that only has 1 row to it. I would like the default value of a field to the third column of that row.
I tried to simply reference that cell in expression field like this:
=[qryWhosComputer]![Last]
Unfortunately it comes up an error. Is there a way I can refence the default value to be that "Last" column of that query? Maybe telling it the first row somehow? All the query does is match to values from two tables. There always is a one-to-one relationship.
1. Defaults can be set for columns in tables, controls on forms, or in code behind a form. Queries do not support defaults, events, or code.
2. Users should NEVER be exposed to a query. You should always use a form for data entry or a report for displaying data.
To do what you are asking in a form, you can use the Form's BeforeUpdate event. You can either just fill in the empty value or you can prompt.
If Me.SomeField & "" = "" Then Me.SomeField = Me.ThirdColumnEnd If
2. Users should NEVER be exposed to a query. You should always use a form for data entry or a report for displaying data.
To do what you are asking in a form, you can use the Form's BeforeUpdate event. You can either just fill in the empty value or you can prompt.
Open in new window