Jgrant@soilsafe.com
New member
- Local time
- Today, 16:16
- Joined
- May 16, 2012
- Messages
- 8
I have a subform connected to a main form. The subform is a tab form with a one to many relationship. The subform directs data from one of the fields in my subform into another hidden field in the record. it is based on an if then statement based on a field in my main form. THe problem is that the code will not recognise the information in the subform until I leave the main form (or it loses focus) and come back. Then all my code works fine. I've tried DoCmd.RunCommand. AcCommandRecordSave and that didn't work.
This is the code I have so far. It just won't work and I can't figure it out. Pls Help
Dim db As DAO.Database
Dim rst As Recordset
Dim strSearchName As String
Dim AppnoSSI As String
Dim AppNoCEC As String
Dim AppNoSSIM As String
Set rs = Me.Recordset
rs.Edit
DoCmd.RunCommand acCmdSaveRecord
If Forms!approvalnumbers!Facility = "SSIL" Then
[appNoSSIL] = [Forms]![approvalnumbers]![ApprovalLetterInfosubfrm].Form![ApprovalLetter]
This is the code I have so far. It just won't work and I can't figure it out. Pls Help
Dim db As DAO.Database
Dim rst As Recordset
Dim strSearchName As String
Dim AppnoSSI As String
Dim AppNoCEC As String
Dim AppNoSSIM As String
Set rs = Me.Recordset
rs.Edit
DoCmd.RunCommand acCmdSaveRecord
If Forms!approvalnumbers!Facility = "SSIL" Then
[appNoSSIL] = [Forms]![approvalnumbers]![ApprovalLetterInfosubfrm].Form![ApprovalLetter]