Dlookup Help (1 Viewer)

ty939

New member
Local time
Today, 02:08
Joined
Feb 14, 2019
Messages
9
Hi , thanks in advance to all

I have this dlookup that is suppose to get a date(NewValue) from a table(Audittrail) where FormName = frmactiondetails(this is a column in audittrail) and where actionID(which is on the form frmactiondetails) is a date.

=DLookUp("NewValue","[tblAuditTrail]","[FormName]='frmActionDetails' And ActionID=" & [Reports]![PATS_ACTIONID])

Any reason why I am getting an error?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 02:08
Joined
Oct 29, 2018
Messages
21,358
Hi. Not sure I understood your description. Can you maybe post a screen image?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 02:08
Joined
Aug 30, 2003
Messages
36,118
I would add that this:

[Reports]![PATS_ACTIONID]

probably needs to be:

[Reports]!ReportName.[PATS_ACTIONID]
 

ty939

New member
Local time
Today, 02:08
Joined
Feb 14, 2019
Messages
9
Im thinking, I am going about this all wrong. I need to get a date from frmAudittrail where formname is frm actiondetails. I attached an image
 

Attachments

  • dlookup.PNG
    dlookup.PNG
    87 KB · Views: 89

plog

Banishment Pending
Local time
Today, 04:08
Joined
May 11, 2011
Messages
11,613
Give us an example. Tell us what values are on your form and what value from that screenshot you expect returned.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 02:08
Joined
Oct 29, 2018
Messages
21,358
Hi. In the image you posted, I don't see any "ActionID" column.
 

ty939

New member
Local time
Today, 02:08
Joined
Feb 14, 2019
Messages
9
sorry for the late response.I was extremely busy yesterday.

As you can see on the two images, I need to create a where statement. RecordID = PatsActionID .So if those two are the same then I want the date on the column newValue
 

Attachments

  • dlookup2.PNG
    dlookup2.PNG
    44.6 KB · Views: 89
  • dlookup3.PNG
    dlookup3.PNG
    19.3 KB · Views: 86

Users who are viewing this thread

Top Bottom