Search results

  1. R

    Divide by zero error-trapping

    Thanks. You led me to the solution. I can't believe I forgot this. It's sad when senility strikes....I'm not even 40. My mistake: I called the function using the following: StatusColor(Me.txtQuantityOnHand, Me.txtQuantityAuthorized) when what I should have done was call them as follows...
  2. R

    Divide by zero error-trapping

    Yes, that's intentional. The way I wrote it, and from my understanding between the difference of how an If-then-else loop works vs. the IIF function, only the true path of the if-then-else loop will run. So if the values are Null, or Zero, or negative, the function is supposed to assign a...
  3. R

    Divide by zero error-trapping

    Hello all, I've got a little function (code is below) in a supply database, that takes in Quantity Authorized (QAUTH) and Quantity on-hand (QOH), and divides them, to get the %, and then returns a string color-code value (G-green, A-Amber, R-Red) based on that percentage. Problem is my code...
  4. R

    Changing Primary Keys

    valid point Thank you very much. That is all very valid. My experience with these databases over the past few years is such that, while the MR# may be truly unique, people often write them down incorrectly, or enter them incorrectly, or try to enter them twice and get confused when Access...
  5. R

    Changing Primary Keys

    Thank you Thank you both. I actually did everything you said (with the exception of the update queries, which I'm still not nearly as facile with as I am with VBA, but that's no excuse), and it all worked smoothly. Please let this be a lesson to anyone lucky enough to read this when they...
  6. R

    error handling

    Primary keys If you check out my post in the general forum, you might see the problems that develop years later from having a user-entered primary key. You shouldn't try to get fancy with VBA to fix this. You should avoid it with cleaner programming. Whenever I create a table, no matter...
  7. R

    Naming conventions

    Leszynski Naming Convention Rather than re-invent the wheel, there already is a consensus naming convention. Follow this link to check it out: http://www.acc-technology.com/namconv.htm The link also hawks some re-naming software designed to do the renaming for you. I can't comment on the...
  8. R

    Changing Primary Keys

    Hello all, I am re-working an old database that 'grew up' the wrong way. It is a medical patient database and has 4 main tables. Primary key of main data table is Medical Record number (MR#), a user entered field (I know...). This links to 3 other tables: Diagnoses (indexed by MR# as well...
  9. R

    Wish to hide the output window

    You're right Now that I hear what you're saying, it becomes obvious. I had an early approach that achieved through brute force a service that I should have been offering the user with a well designed query. I need to work on this one, but it will end up being better than saving all those...
  10. R

    Wish to hide the output window

    This definitely helps Thanks for the good suggestion. The problem is that the query, as presently designed, is not ready to go directly into textfile format. But that is only a small problem that is easily fixed. What this did do was eliminate the pop-up window, and that's really nice.
  11. R

    Wish to hide the output window

    Not trying to reinvent the wheel Thanks for the clarification - you are of course correct - I am working in VBA. What threw me was in the 'about ms visual basic', it said 'visual basic 6.0', but down at the bottom of that window it does say VBA. I am totally open-minded as to the best way to...
  12. R

    Wish to hide the output window

    Thanks for replying; let me clarify. Thanks for your reply to my plea for help, and sorry for not enough detail. My database is currently in Access 2000 (with visual basic version 6.0). On my main switchboard form, in the on timer event I have a routine that automatically saves a report...
  13. R

    How to hide printing (splash) window

    Did you ever figure this one out? Hello. I posted a very similar question yesterday in the VBA forum. The one response did not work, and I haven't had anything else yet, which is usually a bad sign. I'd like to know if you ever figured this out. Here is my post from yesterday...
  14. R

    Wish to hide the output window

    No luck Thanks for the reply. That didn't work. The DoCmd essentially prints the list to the file, so a printing box appears. It is this box that I am trying to suppress. It doesn't prompt the user for anything, and is fairly innocuous. However, it does offer a cancel button. I deal with...
  15. R

    Wish to hide the output window

    In A2000, with VB6.0, I use the following line to save a report to a file. DoCmd.OutputTo acOutputReport, "rptMABriefList", acFormatRTF, Filename Works just fine. I want this process to be automatic and hidden from the user, but a window pops up with a "Cancel" button. I don't want to...
  16. R

    Archiving Old Records

    Any ideas on how I could go about archiving data from my Medical Patient Database? Patients are represented with a single record. Each patient could have an unlimited amount of admissions (linked by PatientIndex), surgeries (again linked by PatientIndex), and unfortuantely, complications...
  17. R

    ?? SQL string in table as a record

    I guess you could do that The only problem I have with that is then, depending on how flexible you want the thing to be, you have to apply a filter or something to focus the query. I haven't explored the world of filters yet, but its not to complicated to make the SQL builder and store it (or...
  18. R

    ?? SQL string in table as a record

    I have been working on something similar I have a form that end-users will use to build a query. The query appears in a subform. They first choose from 3 categories (with cmd buttons) - each button enables or disables the visibility property of several option buttons based on which criteria...
  19. R

    Subform recordsource for searching

    I think I do need to do both I think I know what you mean. I can keep the object source as the same subform and just re-query its recordset with new sql by assigning the me.subform.forms.recordsource = sqlstring. I will try, but the first time I did it that did not work - I will give it a go...
  20. R

    Subform recordsource for searching

    I have an unbound form with several controls that I use as criteria for making a custom user query. I would like each combination of options to allow me to assemble an sql statement, then use that to open up a recordset and set the object source of a subform to that recordset. My only problem...
Top Bottom