Search results

  1. A

    Change field color based on field value

    Assuming it is in a form, and the field on the form is called txtAmt the code would look something like this. if txtAmt<0 then Me.txtAmt.Forecolor=255 end if You could place this code in the lost focus event of the textbox.
  2. A

    Need to only access filtered recordset

    You could create a query which filters the recordset, and populate your form from this. In your procedures and functions, you would refer to the query in your dlookups, or dmaxs.
  3. A

    Access 2000 date madness

    I thought as you do John. However, provided the Windows regional setting is formatted for the correct region, and both dates are in the same format, it does not seem to present a problem in the DLookup function, for us Antipodean programmers.
  4. A

    Dcount not working but should

    Try modifying your DCount as below: If DCount("[eventnumber]", "newquery", _ "[regionaldirectorcode]= " & glblDirCode) = 1 Then
  5. A

    Counting Records in query

    I am trying to set up a module to create a query field that counts the number of records. the module I have coded reads: Function GetNextCounter(pvar As Variant) As Long Dim Counter Counter = 0 ' Initialize variable. While Counter < 20 ' Test value of Counter. Counter =...
  6. A

    Formatting a VBA Message Box

    I have found vbCrLf better than Chr(13) and chr(10). It is more reliable consistently
  7. A

    Is this a bug or am I cracking up !

    If a form or other item in Access is open at the time you are writing code, that has a timer function operating it causes this problem. I found this problem to be fixed by, closing what I was doing, and opening the form directly in VBA code from the toolbar. This problem only seemed to occur...
  8. A

    SQL Delete Statement

    Thanks for your assistance. I will try that and see how it goes.
  9. A

    SQL Delete Statement

    Okay, here I am stuck yet again. No wonder my Mrs. isn't talking to me, the cats left home and there's no food in the fridge. Isn't VBA wonderful? I have a problem understanding the SQL code properly. At the moment my total knowledge comes from creating queries, copying the SQL code to VBA...
  10. A

    Close form wihout saving data command button

    If you have access 2000, the auto complete function shows you how to code this function. When I wuz really green, and did not even think of places like this forum, I use to use the button wizard to make lot's of buttons, and then copy the code, modifying one thing at a time until it did what I...
  11. A

    SQL and a bit confused

    Thanks very much Pat. Problem Solvered.
  12. A

    SQL and a bit confused

    I did not realise that. That's why it won't work then. I am trying to set the forms recordset based on the SQL statement.
  13. A

    Error trapping Null or zero-length Primary Keys

    I have been using a "if IsNull(txtT) then " on the lost focus event on the control to force the user into a loop, where required data must be entered. I think there is a more elegant solution but this seems to work okay.
  14. A

    SQL and a bit confused

    Having not done a lot with SQL I thought it easiest to create a query and copy the code into code. The question is that when I run the query, the code goes to the appropriate record, but the code below only brings up the first record. Is there some other step I am missing? Private Sub...
  15. A

    Form to report

    My users access a form on whch they input data. Based on this data the program makes recommendations. To date this has resulted in a list of steps to take being printed out on a form. I was wondering if it is possible to print the recommendations on a report instead, and whther this would...
  16. A

    Training

    I thought now I have read a few books, and developed some simple applications, to take my skills to the next level I would do a training course. There are quite a few available. I was thinking about a self study course like that delivered by AppDev.com. Anyone got a recommendation?
  17. A

    Linked Tables

    I thought it would be a good idea to set my data tables as linked tables, and access them through another Acess Database containing the forms and queries. In this way I would have a shell / data set up. Does anyone understand how these links are set up and controlled by access. If I move the...
  18. A

    Adding Countdown Routine to an Excel Splash Screen

    I usually use access, but I think the same properties are essentially available in excel. In one of the click on close, unload or whatever events set the forms timerinterval to 1000. In the timer event call a function, say et. The function then does whatever.
  19. A

    Small App If Anyone is Interested...

    I would be grateful to receive a copy.
  20. A

    Input Output Append and stuff

    The underlying thought behind this is to retain records for twelve months. For some retail customers, but not all. I thought it would be nice to have the option of using DAT files as they are smaller and if I create a few hundred, won't cause any problems with Access.
Back
Top Bottom