I have a form where the RecordSource is a query. In this query I have an expression as under and display this value of QryCode in the form using an unbound text field
QryCode: IIF(Left([itemmastertbl].[internalcode],1) = "B" or Left([itemmastertbl].[internalcode],1) = "F",
Mid([itemmastertbl].[internalcode],3,4),
IIF(Left([tblItemMasterPricingSpecs].[FGCode],1) = "F" or Left([tblItemMasterPricingSpecs].[FGCode],1)= "E" or Left([tblItemMasterPricingSpecs].[FGCode],1)="T",
Left([tblItemMasterPricingSpecs].[FGCode],4)
))
If the QryCode in the form is blank, I need the user to be able to enter a value in another field and store this in the table tblItemMasterPricingSpecs. This is not difficult as this table is part of the query which is the source for the form. The control of this field is "InputCode"
What I want to do is
a) Display the QryCode value in InputCode and store this value in the table
b) If QryCode is Null, allow the user to add a value in InputCode and store this value
c) If QryCode is NOT NULL, and a value is displayed, prevent the user to edit the value in InputCode
I want use this InputCode value in another query
How can one achieve this?
QryCode: IIF(Left([itemmastertbl].[internalcode],1) = "B" or Left([itemmastertbl].[internalcode],1) = "F",
Mid([itemmastertbl].[internalcode],3,4),
IIF(Left([tblItemMasterPricingSpecs].[FGCode],1) = "F" or Left([tblItemMasterPricingSpecs].[FGCode],1)= "E" or Left([tblItemMasterPricingSpecs].[FGCode],1)="T",
Left([tblItemMasterPricingSpecs].[FGCode],4)
))
If the QryCode in the form is blank, I need the user to be able to enter a value in another field and store this in the table tblItemMasterPricingSpecs. This is not difficult as this table is part of the query which is the source for the form. The control of this field is "InputCode"
What I want to do is
a) Display the QryCode value in InputCode and store this value in the table
b) If QryCode is Null, allow the user to add a value in InputCode and store this value
c) If QryCode is NOT NULL, and a value is displayed, prevent the user to edit the value in InputCode
I want use this InputCode value in another query
How can one achieve this?