Hello guys,
I will try my best to explain the problem that would make sense...
I have a simple synchronized combo box which is associated with Roles and Statuses
The functionality of the synchronized combo box is correct, it's just that if I put the form into Continuous Form, and when you look at the form, some data from the Status is invisible (not deleted because if you look at Table1, it still stores the data). You have to click on to some Status to actually make those invisible statuses show up, and when some of the invisible statuses show up, the previous statuses that was showing up suddenly becomes invisible... I hope I am making sense here, I'm sure that most of you think that I might be going crazy, but it is true...
I will still post the table structure and codes that I have: (I am using a test db so some field and table names might not make sense or not named correctly)
Table1 -- Where Form1 is bound to
rr -- Number (Role)
ss -- Number (Status)
tblRole
RoleID -- PK
Role
tblStatusChange
StatusChangeID -- PK
Status
tblRoleStatus
RoleID -- FK to tblRole
StatusChangeID -- FK to tblStatusChange
Query4
Form1
Format -- Continuous Form
Record Source -- Table1
On Current --
Field Name: Role ComboBox Name: Combo0
Control Source: rr
Row Source:
After Update Event:
Field Name: Status ComboBox Name: Combo2
Control Source: ss
Row Source:
On Got Focus Event:
I hope I made sense with my explanation and with the codes, table and query setup that I posted... I really appreciate any help or guidance to fix the problem.
Thank you very much.
I will try my best to explain the problem that would make sense...
I have a simple synchronized combo box which is associated with Roles and Statuses
The functionality of the synchronized combo box is correct, it's just that if I put the form into Continuous Form, and when you look at the form, some data from the Status is invisible (not deleted because if you look at Table1, it still stores the data). You have to click on to some Status to actually make those invisible statuses show up, and when some of the invisible statuses show up, the previous statuses that was showing up suddenly becomes invisible... I hope I am making sense here, I'm sure that most of you think that I might be going crazy, but it is true...
I will still post the table structure and codes that I have: (I am using a test db so some field and table names might not make sense or not named correctly)
Table1 -- Where Form1 is bound to
rr -- Number (Role)
ss -- Number (Status)
tblRole
RoleID -- PK
Role
tblStatusChange
StatusChangeID -- PK
Status
tblRoleStatus
RoleID -- FK to tblRole
StatusChangeID -- FK to tblStatusChange
Query4
Code:
SELECT
tblRoleStatus.StatusChangeID,
tblStatusChange.Status,
tblRoles.RoleID
FROM
(tblRoles INNER JOIN tblRoleStatus ON tblRoles.RoleID = tblRoleStatus.RoleID) INNER JOIN tblStatusChange ON tblRoleStatus.StatusChangeID = tblStatusChange.StatusChangeID
WHERE
(((tblRoles.RoleID)=[Forms]![Form1].[Combo0]));
Form1
Format -- Continuous Form
Record Source -- Table1
On Current --
Code:
Private Sub Form_Current()
If Len(Trim(Nz(Combo0, "") & "")) = 0 Then
MsgBox "Please Enter a Role"
Combo0.SetFocus
Else
Combo2.Requery
End If
End Sub
Field Name: Role ComboBox Name: Combo0
Control Source: rr
Row Source:
Code:
SELECT
tblRoles.RoleID,
tblRoles.Role
FROM
tblRoles;
Code:
Combo2.Requery
Field Name: Status ComboBox Name: Combo2
Control Source: ss
Row Source:
Code:
SELECT
Query4.StatusChangeID,
Query4.Status,
Query4.RoleID
FROM
Query4
WHERE
(((Query4.RoleID)=[Forms]![Form1]![Combo0]));
Code:
Private Sub Combo2_GotFocus()
If Len(Trim(Nz(Combo0, "") & "")) = 0 Then
MsgBox "Please Enter a Role"
Combo0.SetFocus
Else
Combo2.Requery
End If
End Sub
I hope I made sense with my explanation and with the codes, table and query setup that I posted... I really appreciate any help or guidance to fix the problem.
Thank you very much.