Search results

  1. A

    Assistance with Select Case Statement

    The reason the second example doesn't work is that your string values are not enclosed in quotes, as they are in the first example. Also, if you're looking to compare arg to a sequence of string values, you don't need the "Is =", although it probably won't cause a problem. You may also want to...
  2. A

    bogus error message 3125

    I have an Access 97 database which is used to design tables which are then built in SQL Server 2000. As new tables and fields are added to the designs, or old ones are modified, I have VBA code which generates an SQL script to build or modify the tables as per the current designs, as well as...
  3. A

    bogus SQL error message

    I'm afraid I can't be of much help to you. We only used a previous version of SQL Server very indirectly, by linking Access databases to some of its tables for reporting purposes. The actual server was set up an maintained by a third party. I also have only the most cursory understanding of...
  4. A

    bogus SQL error message

    Yes, we are. Actually, another department is setting it up, and I have to extract from our administrative system data for use by Kronos. The selection criteria are complex and ever changing, hence this macro.
  5. A

    bogus SQL error message

    In Access 97, I have an append query involving 1 local table plus 3 tables linked in from SQL Server 2000 (the SQL View of the query is shown below). I also have a macro set up to clear several local tables (including the local table involved here) and then run a number of queries, including...
  6. A

    erratic cursor movement and character replacement in code window

    I'm sorry to say I never did establish either the cause or the solution, although the problem has not recurred on any code I've worked on recently.
  7. A

    Report hangs

    I created a whole new .mdb file, imported all the database objects into it, compiled and saved it, compacted and repaired it, and the problem is still there. On closer inspection, it appears that hang occurs only with one group of records (out of about 75), yet there is nothing unusual or...
  8. A

    Forcing entry on if info in 1 out of the 2

    Setting up the second control so that the user can't leave it without making an entry could cause other problems. For instance, if the user is simply tabbing through these two fields they'll have to put an entry into the second one even if there is no entry in the first one. Or, they may put...
  9. A

    Subform open with a command button?

    Make sure that the subform control's LinkChildFields and LinkMasterFields are set properly. They are the properties which keep the subform's record "in synch" with the current record on the main form. Also, note that these properties are set for the subform control, not the subform itself.
  10. A

    Forcing entry on if info in 1 out of the 2

    Try putting your error checking code in the form's BeforeUpdate event procedure - if the business rule (both fields must be Null or both fields must NOT be Null) is not met, display an appropriate message box, set the focus to one of the controls, and set the procedure's Cancel argument to True.
  11. A

    Report hangs

    I've got an Access 97 application with several reports, all of which have opened quickly and without error for some time. All of a sudden, one of them always immediately hangs with the message "Formatting page, press Ctrl+Break to stop..." The report is based on a query which joins two tables...
  12. A

    Weird DCount problem

    I probably didn't explain this clearly enough. The last statement of my first paragraph was something I was trying instead of, not in addition to, the actions described in the rest of the paragraph. What I meant was, when the DCount function didn't work in the form, I tried to make it work in...
  13. A

    Data Entry Issue

    It's possible to coordinate two forms in the way you describe, but it's pretty cumbersome. Better to simply make one form accommodate all the fields in the table. One way to do that is to make the form longer, and make sure that its ScrollBars property is set to either Both or Vertical Only...
  14. A

    Can you query a record set?

    In Access 97, you can do something like this: 'sequentially process all records in a table, displaying 'the value of the field MyField for each record. Dim db as Database, rs as Recordset Set db = CurrentDb Set rs = db.OpenRecordset("MyTable") With rs Do While Not .EOF MsgBox !MyField...
  15. A

    midnight problem (24:00) calculation

    Another approach is to simply check to see if the time difference is less than zero, and if so add 24 hours to it.
  16. A

    Decimals on a Report

    I took a quick look, and my guess is that the problem may be due to the fact that some of your controls have names consisting entirely of digits. When you refer to those controls in the ControlSource property of other controls, Access may be interpreting the string of digits as a numeric...
  17. A

    Data Entry Issue

    Thanks for your kind words. If the main reason for separate forms is to export the record to Word, you can still do that without a separate form. Once the record has been saved, you can use a query to make it directly available to Word. The query would return all fields from the table where...
  18. A

    midnight problem (24:00) calculation

    If you can include the date as well as the time in the values for StartHour and FinishHour, you can use the DateDiff function to correctly calculate the time difference. Note that even if the date is included in the value, you can still display only the time portion of it by choosing an...
  19. A

    Remembering Entries on a Pop-Up Form

    One way is to set up a Parameters table with a single record containing the saved values from the form. The form would then be bound to that table and have its NavigationButtons and RecordSelectors properties set to No. A more elegant way to do this is with user-defined database properties...
  20. A

    Data Entry Issue

    You may want to re-think your approach before getting started. Data confirmation and validation are generally done on the same form as where the data is entered - using multiple forms is likely to produce an application that is less reliable, more clunky and much more difficult to create, debug...
Back
Top Bottom