GregoryWest
Registered User.
- Local time
- Today, 15:18
- Joined
- Apr 13, 2014
- Messages
- 161
I have a temp macro that has one step: Run Code : MakeExp
Inside my Module1 I have the following:
Public Sub MakeExp()
Dim rs_in As DAO.Recordset
Dim rs_out As DAO.Recordset
Dim strSql_in As String
Dim strSql_out As String
Dim ExpName As String 'Path and name of text file
---A ton more lines
sline = sline & slegal & Chr(34)
rs_in.MoveNext
Loop
Print #ExpNumber, sline
Close #ExpNumber
Close rs_in
End Sub
But when I run the macro I get the following error:
MicroSoft Access can not find the name 'MakeExp' you entered in the expression
Can anyone shed light on why this might not be working? Did I forget about telling Access the code is in Module1 (dont think I need to do that.....)
Inside my Module1 I have the following:
Public Sub MakeExp()
Dim rs_in As DAO.Recordset
Dim rs_out As DAO.Recordset
Dim strSql_in As String
Dim strSql_out As String
Dim ExpName As String 'Path and name of text file
---A ton more lines
sline = sline & slegal & Chr(34)
rs_in.MoveNext
Loop
Print #ExpNumber, sline
Close #ExpNumber
Close rs_in
End Sub
But when I run the macro I get the following error:
MicroSoft Access can not find the name 'MakeExp' you entered in the expression
Can anyone shed light on why this might not be working? Did I forget about telling Access the code is in Module1 (dont think I need to do that.....)