Search results

  1. D

    How to Create dBase4 file from .txt

    Is there a way in VB to create a dBase file using a .txt file as input? Thanks, Denny
  2. D

    Form values dictate Report Values

    You could still conceviably pass the same seelction criteria as used to get the records on the form. it might simplify things if you modified to query used for the report to include Year and Month fields as well (calculated fields). the selection string might be something like: strSQL = "Year...
  3. D

    Multiple Reports, One Record At A Time

    I think I see the problem if the code you sent is accurate. The strRecord statement needs to be inside the loop so that value changes on each record. At least in theory that seems right but ideas like this often fall apart when I try to implement them. Green Bay, eh. Not so far away after...
  4. D

    Multiple Reports, One Record At A Time

    Glad to hear it worked!. I'm in Iowa City, Ia. It's at the end of the Road Less Travelled (if at all). Perhaps I can collect on that beer offer at the next intergalactic Access User Group convention. denny
  5. D

    Multiple Reports, One Record At A Time

    It does look like you're very close. I think the changes that you need would be as follows: strRecord = "Project Name ='" & rstRecords("Project_Name") & "'" DoCmd.OpenReport strRptName, acViewNormal,,strRecord I'm assuming that your Project Name field is a character field in which case you...
  6. D

    Multiple Reports, One Record At A Time

    The synatx would be something like this: dim strSQL as String dim stDocName as string do while not rs.eof strSQL = "Account = " & rs("Account") stDocName = "AcctRpt1" DoCmd.OpenReport stDocName, acPreview, , _ strSQL rs.movenext loop I'm assuming you know how to open up the recordset...
  7. D

    Error 32811 in Executing a Procedure with VB Code

    I have a user on Access 97 trying to run a VBA procedure and she always gets an error message: 32811 Unexpected or Unknown Error I have other users who are able to run this same module with no problem. I have had her re-import the form a couple of times since I saw something in the Knowledge...
  8. D

    Form values dictate Report Values

    How is the selection criteria passed to the form? I assume that the user must be entering a value in some control or selecting a value from a combo box such that you get a subset of records to display on the form. Since you are currently passing selection criteria based on a single field you...
  9. D

    Error in Exporting Report To Excel

    I'm using Access 2000 on Windows 98. I have a report that I'm trying to export to Excel from the Report View. The pop-up window indicates that it's exporting 14 pages even though there are only 13 pages in the report and then I get an Access error: "Microsoft Access can't retrieve the value of...
  10. D

    Multiple Reports, One Record At A Time

    You might try setting up a loop within your VB code where you read one record at a time. Within the loop issue the DoCmd.OpenReport command and pass selection criteria for the current record. In this approach the report gets run as many times as the number of records in your input table...
  11. D

    Form values dictate Report Values

    I believe that you would need to pass the same selection criteria to the report as you used in getting your form populated. I know that may not be easy or practical since you're probably using different record sources. denny
  12. D

    Count in form

    In response to Question#2, I would create a field in your query that would derive this count: GreaterThan10:iif([Diff] > 10,1,0) Add this field to your form, probably with the Visible property set to No, in the footer section add a text box and set the value to =sum([GreaterThan10])
  13. D

    Deleting Stuff!

    Gee, this all started out loooking so easy (those are the only ones I touch). The error message you're getting is mysterious to me. I assume that some of the people who live and breath VBA would be able to explain that problem and how to fix it. You should be getting a dropdown list of...
  14. D

    Deleting Stuff!

    My fault, I missed a parenthesis when I was editing the example, also you need some other statemenst as the Example in Help led you to believe sorry: Dim dbClient As Database Dim qdf As QueryDef Set dbClient = CurrentDb Set qdf = dbClient.QueryDefs("Query1") qdf.Execute Denny
  15. D

    Deleting Stuff!

    Instead of ClearOutDailyTransactions (nice short name) you should put in your more discreet query name, i.e. query1. Presumably that should work with the few paltry statements that I sent you. Denny
  16. D

    Deleting Stuff!

    You probably should spend time getting some level of familiarity with queries unless you want to write everything in VBA. They are pretty easy to create but difficult to explain in writing. However, Microsoft has been thoughtful enough (such a nice company) to include most of that in the Help...
  17. D

    Deleting Stuff!

    You can do it in code or you could execute a delete query. I'll give you the command for executing a query in code: Set qdf = dbClient.QueryDefs "ClearOutDailyTransactions") qdf.Execute Denny
  18. D

    How to Get Rid of Quotes When Writing to TXT File

    If you use Print rather than Write you won't get the quotes. Denny
  19. D

    One Field, Diff. Entries

    I'm not clear on your question but I'll answer the one that I can figure out. I will assume that your field is something called Status where the values are "Sent" or "Returned". In a select query for your report you would have a calculated field like so: Result: iif(Status = "Returned",1,0)...
  20. D

    Date/Time Calculation which Excludes Weekends & Holidays

    Here is an example that involves setting up calculated fields in a query to arrive at the number of weekend days that are in your date range. There may be some holes in it but maybe it will give you some ideas: Weeks: int((date1 - date2)/7) DaysLeftover: (date1 - date2) mod 7 WeekendDays...
Back
Top Bottom