I have a linked Sql view that retrieves the max number for a column named CHSRNumber. This query adds 1 to this number to give the next sequential number for a new record to be created and it is called NewChsrNumber.
I have a text box named CHSRNumber on a form that I set the property default to be =[Tables].[FacilitiesQueri es_MaxChsrNumbe r].[NewCHSRNumber].
When the form is opened, the text box states "#NAME?"
I have also attempted to use an event to set the text box to this new number by using the below:
The sql table opens with the correct info but then I receive an error 2645 stating it cannot find the field referred to in the expression.
Any suggestions would be appreciated.
I have a text box named CHSRNumber on a form that I set the property default to be =[Tables].[FacilitiesQueri es_MaxChsrNumbe r].[NewCHSRNumber].
When the form is opened, the text box states "#NAME?"
I have also attempted to use an event to set the text box to this new number by using the below:
Code:
DoCmd.OpenTable "FacilitiesQueries_MaxChsrNumber" Me.CHSRNumber = [Tables].[FacilitiesQueries_MaxChsrNumber].[NewCHSRNumber]
Any suggestions would be appreciated.
Comment