cheekybuddha
AWF VIP
- Local time
- Today, 16:08
- Joined
- Jul 21, 2014
- Messages
- 2,764
If you are using a table directly as a record source for your forms, you should not do that. Create a query based on your tables and use that as a record source for your forms. For the main PO form, create a query based on the tblPONumber. For the subform, create a query based on the tblPODeatail table. Make sure each query is set for Unique records only, so the Unique Records property is set to 'Yes'I click on OK then it works as it should
As far as I'm aware access has not updated since last Sept, everything else is working fineWhilst MajP makes a valid observation, there's no point hacking up your app if it's caused by an Access bug - my point is to check first and rule it out. If the Access version is not to blame, then go looking for what the problem is within the app.
But if you go searching for workarounds without ruling out the part that's beyond control you will just be wasting your time and possible worse still introduce other bugs
Did you check your version and rule out that it's not the cause?
There is no indexed property showing on the property sheet?One other thing to check:
- Open the tblPODetail table and look at the PONumberID field. That is the field linked to your main table.
- Check to make sure the Indexed property is set to Yes (Duplicates OK)
I have a query as the sourceAlthough allowed, I would never have a table as the source object anyways. Very limiting.
I do not have any codePlease post the code you are using. If you have created the subform correctly and set the master/child links, NO CODE is required to populate the foreign key field when you are using a subform.
No macros being used, I have the default value of a text box as =[Forms]![frmPO]![POID] so that frmPODetails has a reference back to the correct PO numberAre you using macros?
If you are trying to automatically add records, that doesn't happen by magic. There is code or a macro running somewhere.
I setup the links in the relationship window after making the tables, as far as I know subform controls are set correctly...I removed the default value and it didn't like itAs I said, if you have properly defined the relationships and set the master/child link property, you need NO CODE of ANY kind to populate the foreign key.
Did you create the relationships using the relationship window?
Are the master/child links on the subform CONTROL set correctly? If not, set them manually.
REMOVE the default value.
What does that mean? Did you check?as far as I know subform controls are set correctly.
What does that mean? Are you still getting the error? Is the subform not syncing correctly?.I removed the default value and it didn't like it