Methodikal
New member
- Local time
- Today, 17:24
- Joined
- Nov 7, 2022
- Messages
- 17
Hi,
I have a Form with a Filter by Supervisor (named AltWorkScheduleF
The Nested Subform is for an Alternative Work Scheduler (named AltWorkScheduleSF).
They use a lot of information from multiple tables and queries.
I have everything working except... When I click on the emplyee combobox in the subform and try to select an employee it will not put that employees name into the datasheet.
All of the fields are there, the Combo Filter from the main form works. The Requery on the Employee Combobox in the subform is working and showing the needed employees.
However, when I try to click on a name to enter their record it doesn't allow me to select them and the combobox goes back to blank.
I believe it has to be a VBA issue. I have this working on another form. I have compared the two and can find no difference. Any suggestions? Here is the VBA:
Here is Both Forms VBA:
Form_AltWorkScheduleF
Option Compare Database
Option Explicit
____________________________
Private Sub Form_Load()
Me.txtDate2.SetFocus
End Sub
____________________________
Private Sub txtDate2_AfterUpdate()
Me.AltWorkScheduleSF.Requery
End Sub
Form_AltWorkScheduleSF
Option Compare Database
Option Explicit
_____________________________
Private Sub EmployeeID2_Click()
Me.EmployeeID2.Requery
End Sub
______________________________
Private Sub EmployeeID2_GotFocus()
Me.EmployeeID2.Requery
End Sub
______________________________
Private Sub Form_BeforeInsert (Cancel As Integer)
Cancel = IsDate(Me.Parent!txtDate2) = False Or (Me.Parent!cboSupervisorID3.ListIndex < 0)
End Sub
Any help would be greatly appreciated.
Thanks,
Methodikal
I have a Form with a Filter by Supervisor (named AltWorkScheduleF
The Nested Subform is for an Alternative Work Scheduler (named AltWorkScheduleSF).
They use a lot of information from multiple tables and queries.
I have everything working except... When I click on the emplyee combobox in the subform and try to select an employee it will not put that employees name into the datasheet.
All of the fields are there, the Combo Filter from the main form works. The Requery on the Employee Combobox in the subform is working and showing the needed employees.
However, when I try to click on a name to enter their record it doesn't allow me to select them and the combobox goes back to blank.
I believe it has to be a VBA issue. I have this working on another form. I have compared the two and can find no difference. Any suggestions? Here is the VBA:
Here is Both Forms VBA:
Form_AltWorkScheduleF
Option Compare Database
Option Explicit
____________________________
Private Sub Form_Load()
Me.txtDate2.SetFocus
End Sub
____________________________
Private Sub txtDate2_AfterUpdate()
Me.AltWorkScheduleSF.Requery
End Sub
Form_AltWorkScheduleSF
Option Compare Database
Option Explicit
_____________________________
Private Sub EmployeeID2_Click()
Me.EmployeeID2.Requery
End Sub
______________________________
Private Sub EmployeeID2_GotFocus()
Me.EmployeeID2.Requery
End Sub
______________________________
Private Sub Form_BeforeInsert (Cancel As Integer)
Cancel = IsDate(Me.Parent!txtDate2) = False Or (Me.Parent!cboSupervisorID3.ListIndex < 0)
End Sub
Any help would be greatly appreciated.
Thanks,
Methodikal