Pop Up Form

KristenD

Registered User.
Local time
Today, 07:37
Joined
Apr 2, 2012
Messages
394
I have a pop up form in my database that is used when it meets a certain criteria. The issue I am having with this form is I cannot go through the records.

For example, if I want to see how many jobs a person has been on, the form will not allow me in the record navigation to go through the records for that particular employee.

Does this form need to be set up differently? The primary key is an autonumber but the foreign key is tied back to the main table through the employee ID. All the rest of my forms allow me to go through the records for each employee ID but they are not pop up forms.

It would be easier to see it that way than have to run a duplicate query to make sure there has not been double entry any time I enter.

Thank you!!
 
It pops up based on if the employee status = "Active" or if I add a new record.
 
Here is the code:

Code:
Private Sub EmploymentStatus_AfterUpdate()
If Me.EmploymentStatus = "Active" Then
    Me.tblEmpInfo.Visible = True
    
Else
    Me.tblEmpInfo.Visible = False
    
End If
End Sub
Private Sub Form_Current()
If Me.NewRecord Then
    Me.tblEmpInfo.Visible = True
    
Else
    If Me.EmploymentStatus = "Active" Then
        Me.tblEmpInfo.Visible = True
    Else
        Me.tblEmpInfo.Visible = False
    End If
End If
End Sub
 
Sounds like you're opening the form using a where clause in the DoCmd.OpenForm code. Our own pbaldy has the code to open not filtered but just going to the record. I am on my cell phone right now so I can't give a direct link. You can find it at

http://www.baldyweb.com
 

Users who are viewing this thread

Back
Top Bottom