I have a form (frmTransferInAging) where the user inputs a value for business days (eg 10) into txtBusDays. The value is used by a query to determine 10 business days from today - For example, if 10 was entered today I want to calculate 10 business days before today - how do I calculate this...
Well... I did both - changed the name of the field and added the delimiters:
strMacro = DLookup("[Trigger]", "Reports", "[ReportName] = " & Chr(34) & Forms![Report Dashboard]!lstReports & Chr(34))
Now the compile error is that it cannot find the object 'strMacro' on the part DoCmd.RunMacro...
I think I am gettting closer but it still isn't working. The control on my form (Report Dashboard) is a list box - would that be causing this not to work? Here is my revised code:
Private Sub lstReports_Click()
Dim myDb As DAO.Database
Dim strMacro As String
Set myDb =...
When I remove the "set" I now get a type mismatch error on strMacro. The field Trigger is a text data type. Not sure why it still isn't working? Thanks
I am builing a reporting database where I have a form(Report Dashboard) that has an unbound control where the control source is a table (Reports) and reflects the report name from the table. The table has the report name and another field called Trigger that has the name of the macro to run...