Nanscombe was absolitely correct. I did not assign anything to strFile.
StrFile should have been named strFileNew.
Can you see if you can take the filename from a form and get the same
Result? I believe thats where I was getting the error.
I REALLY appreciate your help!!
I have a blank txt file on hard drive, and just copy it to a new file name
specified on a form. This part works. It's the "open" line. It doesn't like
the use of the variable??
When I execute the below function I get an error. If I use the commented out "Open" line it works fine. I get Run-time error '52'. Bad file name or number.
Private Sub GenerateSSA_Click()
Dim strRA As Variant, strFileNew As String, strFileBlank As String
Dim intFileOut As Integer...
Paul,
I should have warned you, and Lagbolt that I'm a Beancounter that had not attempted a function in quite some time. That last change allowed me to correct a couple of syntax errors.
e.g.
"CCodeGrp = User" Changed to "CCodeGrp = 'User'"
Also, I was opening forms, and the form...
The function executes the 2 "Upd" queries, but then bombs.
I get a "Macro Single Step" box, and the only button available is
"Stop All Macros". It doesn't display a line of code causing error??
In "Arguments" box it displays:
UserPasswordCk([Forms]![FrmLogin]![LoginUser], etc.
Do I have...
I've used Access for years, but rarely do functions. I believe the function is a module function. When the button is clicked I execute a macro that "Run code"...
I have a button on a form. I try to execute "on click" event. I'm using Access 2010.
On Click: UserPasswordCk([Forms]![FrmLogin]![LoginUser], [Forms]![FrmLogin]![LoginPassword], [Forms]![FrmLogin]![MachName], [Forms]![FrmLogin]![UserName])
I appreciate your help. In tinkering with it I may have created a different problem? Complete function below. When I try to execute Access can't find the function.
Private Function UserPasswordCk(strUser As String, strPassword As String, strMachName As String, strUserName As String) As...
Why do I get an error on last line?
Function UserPasswordCk(strUser As String, strPassword As String, strMachName As String, strUserName As String)
Dim qdf As DAO.QueryDef
Set db = CurrentDb
'Get the parameter query (This line results in 424 error "Object Required")
Set qdf =...