Ask Experts Questions for FREE Help !
Ask
    JoKate's Avatar
    JoKate Posts: 1, Reputation: 1
    New Member
     
    #1

    Nov 8, 2019, 04:26 PM
    Creating button to cross-reference access level
    I'm creating a database to log incidents and then build the incident report from the log. On my frmFinalIncRpt I have three fields which need to be approved by generally three different people at three different times.

    I'm trying to code buttons to compare the name in two tables "tblUsers" and "tblIncidentReportLog" and only let you approve if the person logged in matches the person named in the final report. The action the button should take would be entering the text of that person's name in the signature field. Or denying you if you're not the right person.

    I've tried Frankenstein-ing it just to see if I could get the front half right and I can't. I don't know if a DoCmd will work but the "frm5DyInc" is just a place holder. I'm pretty lost so really any guidance here would help. I've restricted access on most of the forms using the [AccessLevel] but I'd like to use [Password] here as I have 8 users that need unique approval access.

    Private Sub btnFinalApv_Click()
    If DLookup("[Password]", "tblUsers", "[ID] = " & Forms!frmLogin!cboUser) = DLookup("[ApproverName]", "tblIncidentReportLog") Then
    DoCmd.OpenForm "frm5DyInc"
    Else
    MsgBox "You do not have access", vbOKOnly
    End If
    End Sub

Check out some similar questions!

How do I cross reference DBB Inc. [ 0 Answers ]

How do I cross reference a company who's name is DBB Inc.(DeHart, Brady,& Baldwin, Inc.)

Gas valve cross reference [ 9 Answers ]

I have an heil warm air furnace,with a smartvalve gas valve.sv9500n2674... can't find exact number gas valve.only one I found was an sv9501m2813 says replaces all sv9500 valves.can anybody verify this is true.new in the hvac field not too sure.this natural gas unit,not lp.

Oil filter cross f=reference [ 0 Answers ]

I need to know what other oil filters will fit a 1996 Kawasaki Lakota 300. MFG parts number is: 16099. Thanks, Bill

How do I cross reference? [ 1 Answers ]

How do I cross reference SODA, Inc This is an acronym for Stop on A Dime Assets


View more questions Search
 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.