Hello!
I have 2 forms
frmSource and frmDestination. On frmSource I also have a textbox called AssyPartnumberVis which are concatenation of values from 3 listboxes.
This the code in the control source of txtAssyPartnumberVis:
="A" & [lbxCuttingTools].[Column](0) & Right([lbxCuttingTools].[Column](1),4) & "-" & [lstAdapterResult].[Column](0) & Right([lstAdapterResult].[Column](4),4) & IIf(IsNull([txtInsertDesc]),"","-" & [lbxInserts].[Column](0)) & Right([lbxInserts].[Column](3),4)
OnClose event of frmSource, all the values are passed on to frmDestination and opens frmDestination automatically.
All the data are there alright except it does not generate an autonumber ID field and when I close frmDestination I get Error 3058 “Index or primary key can’t contain a null value.
Possible Causes:
- Tried to add Null value to a primary key field
- Tried to add a new record but didn’t enter a value in the field that contains the Primary key
- Executed a query that tried to put a Null value in a Primary key field
Once again any feedback will be appreciated.
I have 2 forms
frmSource and frmDestination. On frmSource I also have a textbox called AssyPartnumberVis which are concatenation of values from 3 listboxes.
This the code in the control source of txtAssyPartnumberVis:
="A" & [lbxCuttingTools].[Column](0) & Right([lbxCuttingTools].[Column](1),4) & "-" & [lstAdapterResult].[Column](0) & Right([lstAdapterResult].[Column](4),4) & IIf(IsNull([txtInsertDesc]),"","-" & [lbxInserts].[Column](0)) & Right([lbxInserts].[Column](3),4)
OnClose event of frmSource, all the values are passed on to frmDestination and opens frmDestination automatically.
All the data are there alright except it does not generate an autonumber ID field and when I close frmDestination I get Error 3058 “Index or primary key can’t contain a null value.
Possible Causes:
- Tried to add Null value to a primary key field
- Tried to add a new record but didn’t enter a value in the field that contains the Primary key
- Executed a query that tried to put a Null value in a Primary key field
Once again any feedback will be appreciated.