C
Chris75 via AccessMonster.com
Hello,
I have created a switchboard (not using the built-in tool). Works like a
charm. But recently I have been banging my head against a wall trying to
figure out the following.
Previously, the switchboard opened 2 forms via command buttons. One for
employees and the
other for reports. However, not all employees are in the same office.
I created a form to filter office based on an "office" field in my employee
table.
I have something worked out but the problem now is that when I open the
now filtered form "Employees", the unbound combobox "Modifiable4", that I use
to navigate between records is showing up unpopulated (blank).
This is the code I have right now for the On Enter event procedure of the
unbound combo,
dim strSQL as string
strSQL = "SELECT Employees.Employee ID, " _
& " (Employees.Name) " _
& " FROM Employees"
if len(nz(me.filter)) > 0 then
strSQL = strSQL & " WHERE " & me.filter
end if
strSQL = strSQL & ";"
me.Modifiable4.RowSource = strSQL
me.Modifiable4.Requery
if me.Modifiable4.RowSource <> strSQL then
me.Modifiable4.RowSource = strSQL
me.Modifiable4.Requery
end if
Thanks again folks!
Chris
I have created a switchboard (not using the built-in tool). Works like a
charm. But recently I have been banging my head against a wall trying to
figure out the following.
Previously, the switchboard opened 2 forms via command buttons. One for
employees and the
other for reports. However, not all employees are in the same office.
I created a form to filter office based on an "office" field in my employee
table.
I have something worked out but the problem now is that when I open the
now filtered form "Employees", the unbound combobox "Modifiable4", that I use
to navigate between records is showing up unpopulated (blank).
This is the code I have right now for the On Enter event procedure of the
unbound combo,
dim strSQL as string
strSQL = "SELECT Employees.Employee ID, " _
& " (Employees.Name) " _
& " FROM Employees"
if len(nz(me.filter)) > 0 then
strSQL = strSQL & " WHERE " & me.filter
end if
strSQL = strSQL & ";"
me.Modifiable4.RowSource = strSQL
me.Modifiable4.Requery
if me.Modifiable4.RowSource <> strSQL then
me.Modifiable4.RowSource = strSQL
me.Modifiable4.Requery
end if
Thanks again folks!
Chris