The numeric value was used in two places (two loops) in the procedure: once to cycle trough a table and once to set dynamically (based on user input) the size of the range in the workbook.
Have found the sollution! I had declared only one time a numeric parameter and used it in two different ways in the procedure. I have declared a second parameter and the procedure is working well.
It was definitely an Access problem!
Ok, in the future I will update an example program.
An Excel is created and sent for each teacher. The number of columns in the Excel is variable. This works for the first record, but for the second record I get the error message 1004: Method Range of object _Global failed. The last thing I have done now is the Range "rng" set to .clear because I...
I have solved this problem. Thanks for the suggestions :). Now I want to make the "Range" in VBA variable and put the data in a string. When I want to set the range, "Set rng = string" I get an error "Types do not match". How can I modify the type of the string to match the object "Set"...
Excel file was corrupt. This works now. Thanks! :o
But my second question remains: is it possible to run an Excel macro from an Access application, like:
Range("L2").Select
Range(Selection, Selection.End(xlDown)).Select
Range("M2:M26").Select
With Selection.Validation...
When I try to open a workbook in my Excel application I get the error 1004 ("the file .....xlsx can't be opened because the file extension or the file format isn't correct"). I have checked this and the extension as the format is correct. I got the error on the line ".Workbooks.Open...
In one of my application doesn't work this statement. In the other I have no problem at all. It gives the error "Sub or function not defined". :mad:
LocationNewApplication = DLookup("VersionNewAppLocation", "tblVersieProgramma") & "\" & CurrentProject.Name
Set db =...
Found the problem. Is problem of Microsoft and not mine! Whew! :) See http://www.utteraccess.com/forum/index.php?showtopic=2035785 for some workarounds. The problem lies in one of the arguments of the openreport commando. First I wrote this line:
DoCmd.OpenReport "rptPerScholenProcenten"...
Here
Private Sub cmbPDF_Click()
Dim strPadNaamBestandsNaam As String
Dim txtOutPutFile As String
Dim strCodeModule As String
strCodeModule = "frmPDF cmbPDF_Click"
On Error GoTo foutafhandeling
' 'Opening report here
DoCmd.OpenReport "rptPerScholenProcenten"...
Starting with a click on a button to open a report gives error 2046 (Run-time error 2046 the command or action 'OutputTo' isn't available now).
When I put a button (_Click) on a separate form called by the previous form, my report opens without any problem.
When I put the command lines in the...
I didn't explain me very well I think. My question is: what is the name of the domain in this specific dsum-function (my example). It is a temporary query, what kind of name do I put in the domain. Is it "sql", the string-name of the sql, or ???? But "sql " doesn't work.
Thanks in advance!
Thanks very much! It works perfectly.
I have still one question: how can I make a sum of a particular field. I don't know where to refer to for the "domain".
TotalFieldsPD = Nz(DSum(Replace(Me.Parent.txtWGAfdelingDivisiePD, "P", "A", 1, 1), ""), 0)
I have a procedure to make a query but in runtime I get error 3078 ("The Microsoft Access database engine cannot find the input table or query 'name'. Make sure it exists and that its name is spelled correctly."). The query isn't displayed left in the list of the queries (list of all the...
I don't think this is possible because some clients logon remotely (from different locations in Antwerp) and I don't know which map letters they use on their servers.
I have a batch file that I call via VBA shell command. This batch file refers to a folder on the server. One character of the folder name contains a character with an umlaut. This doesn't work for a batch file called through Access! In addition, the folder name is called via a variable. Can this...
In Access 2010 (Win 2008) it is possible to put my own icon for my application on the taskbar. When starting my app my icon appears on the taskbar. Now I have win 10 en Access 2016 and my icon doesn't appear anymore on the taskbar. I didn't change anything of my app. What do I have to do in...