Just learning anything about the coding of DAO syntax....... (Thanks to MBiz & Irog!!!!)
So pardon if my terms here are incorrect....
I have a tabbed form. On that tabbed form Each Tab has at least 1 sub form. Now then on one of the forms, appreciation to Mbiz & Irog, I have a DAO recordset that creates some input fields all correctly!
However, I now am attempting to take that instruction and go to a Tab that has a subform (I'll refer here to as [S1]) and on that [S1] it has it's own Subform [S1-A] which also has a subform [S1-A-1].
Since each of the (form & their subform's) are linked Master/Child in my coding I am getting an error that says a required field is not completed. When I open the tables that the DAO Recordset is creating records in they are there and it looks like the info is in fact completed.
So my question is this (at least I think it is). How do I get the form & subform to update during the nested creation of the records.....so that the Master/child links are updated....
I am going to show the code because the db is too large to post.
My code is
Dim lngCtCoin As Long, lngCtCurrency As Long
Dim iDenomType As Integer, iDenomination As Integer
Dim lngNbrActiveDenominations As Integer
Dim lngTempDenomTypeID As Long
Dim rst As Recordset, rst2 As Recordset
Me.tsfrm_ctldta_MachPullCurrencyTypeCoins.Visible = True
Me.tsfrm_ctldta_MachPullCurrencyTypeCurrency.Visible = True
Me.MachPullTtl = 0
Me.Dirty = False
Me.cboActiveDenominations.RowSource = "SELECT [CurrencyDenominationsID], [CurrencyDenominations], [CurrencyDenominationInactive] FROM [sysctl_CurrencyDenominations] WHERE [CurrencyDenominationInactive]=" & 0
lngCtCoin = DCount("CurrencyDenominationsID", "sysctl_CurrencyDenominations", "CurrencyTypeID= " & 1 & " AND CurrencyDenominationInactive = " & 0)
lngCtCurrency = DCount("CurrencyDenominationsID", "sysctl_CurrencyDenominations", "CurrencyTypeID= " & 2 & " AND CurrencyDenominationInactive = " & 0)
Set rst = CurrentDb.OpenRecordset("Select * From ctldta_MachPullCurrencyType")
For iDenomType = 1 To 2
rst!MachPullID = Me.MachPullID
rst!CurrencyTypeID = iDenomType
lngTempDenomTypeID = rst!MachPullCurrencyTypeID
Set rst2 = CurrentDb.OpenRecordset("SELECT * FROM dta_MachPullDetails")
For iDenomination = 1 To lngNbrActiveDenominations
rst2!CurrencyDenominationsID = iDenomination
rst2!MachPullCountAmt = 0
rst2!MachPullCurrencyTypeID = lngTempDenomTypeID
Set rst2 = Nothing
Set rst = Nothing