User Profile
Collapse
-
Thanks Scott. I'll check out the article and report back on my progress. -
It's complicated. I have to process 3 files. collect the info that was recently entered. Determine the record date for the data. Read a 4th table which is a determines a valid fical year range and then produce the report for that year. I think it'll be easier if I can just findout how to set a value for a parameter in a query. Don't you think?
SalzanLeave a comment:
-
I know for fact that the query is not executed prior to Report_Open. I tested it by placing a MsgBox in the code which comes up first and then the query prompt follows as I step in through the code. I'm assuming there's a control/attribute associated with the query paramter. I need to find a way to access it and set its valur.
SalzanLeave a comment:
-
THANK YOU ALL. Atleast I know I'm not doing it wrong. I think I'll create a compound column, concatenate the values together, and search against it. It should accomplish what I'm after.Leave a comment:
-
-
-
I should have specify that I'm using ADO Recordset. The articles didn't help. My problem is with the criteria string. When I specify only one criteria it works but when I specify multiple criteria with AND operator it give me an error message "arguments are of the wrong type, are out of acceptable range, or are in conflict with one another". I've checked the types of the arguments and they're correct. I don't know what else to search....Leave a comment:
-
Sorry that was a typo - it's strAny. The variable name is not it.Leave a comment:
-
Provide a value to a query prompt – while running a report
I built a query and use it in a report. The query has one parameter that must be satified at run time which is [Year_Id]. Rather than user type a value, I need to provide a value based on certain calculation which I intend to do when the report is open. I have the following code:
[CODE=vb]
Private Sub Report_Open(Can cel As Integer)
MsgBox "Now In Report_Open Sub"
'Do the calculation here
'Provide a... -
Using .Find with multiple search criteria
I have this code:
strAny = "[YearId] = " & rsTemp!YearId
rsPerm.Find strAny
and it works. However, when I do the following it doesn't
strAny = "[YearId] = " & rsTemp!YearId & " AND " & _
"[DeptId] = " & rsTemp!DeptId & " AND " & _
"[CatId] = '" & rsTemp!CatId &... -
Query against a temp table (table created by VBA code)
I create a temp table (using ADOX) and populate it from my form based on various conditions. Now, I'd like to report the results using Reports. I have a query and a report and they work fine. What I need to do now is change the table name in my query so the report runs against a new table/query. Is there a way for me to programmaticall y change the sql string of a query or perhaps is it possible to have the table name act as a variable to be resolved... -
THANK YOU ALL. I got it working with acViewPreview. acViewReport is not supported in 2003 version. I also tried a hardcoded value 5 and it gave me an error. but Preview works for me.Leave a comment:
-
And Thank you again.
Now I'm trying to put it all together and for some reason I'm getting a strange result when executing:
DoCmd.OpenRepor t "ReportName "
it tries to PRINT it!!! I get a printer prompt - my printer points to a file name so it prompts me for the filename.
I would think this should simply open the report but it doesn't - any ideas?
SalzanLeave a comment:
-
Big Thank You. I was thinking the same about passing params to a query. So I have to ask how do I satify the query with the passed argument? I assume that I still call the report and I have to do something when the report opens to satify the query. I don't know what that is. could you help?
As always greatly appreciate your help.
SalzanLeave a comment:
-
Calling a Report from a Form and passing parameters
I have a form in which I collect info from the user and then process various tables. Now, I need to call a report and pass two parameters to it so it’ll only select the desired records for reporting. I’m familiar with the application of OpenArgs and used it successfully to pass several parameters to other forms (using a delimiter to separate and then parse the OpenArgs to pick them). I’m wondering if I can do the same with a report and then... -
Thank you. I assume the columns are in order I created them. Also I can't believe MS didn't include such a method/property in ADOX.Leave a comment:
-
Help with ADOX
I have the following code:
Code:With tblTemp .Name = tmpTable_Name .Columns.Append "DeptId", adSingle .Columns.Append "DeptName", adVarWChar, 50 .Columns.Append "CatName", adVarWChar, 50 .Columns.Append "StartDate", adDate .Columns.Append "EndDate", adDate .Columns.Append "Hours", adSingle .Columns.Append
-
-
Trunc function in Access
I feel stupid for acking but is there an equavelent function to Trunc in Access? Int and Fix funtions all do rounding to neareast integer, I need a way to extract only the integer portion of a decimal number.
Thanks for the help
Feeling Stupid... -
IT WORKED. THe Problem was with the sql string. Your suggestion to get a runtime value for the strSQL and try it in a query window led me to the problem.
Thank you very much.Leave a comment:
No activity results to display
Show More
Leave a comment: