Search results

  1. A

    Converting Access 2003 to 2007

    I am trying to convert my database (which has been running for years without a problem) from Access 2003 to Access 2007 but have hit a problem. I have a form with a text box with the following expression which works fine in Access 2003 but throws up ‘Error’ in 2007. =DSum("(0+[Deposit...
  2. A

    Problem with "2 decimal places" code

    I have this code which checks that a number entered into a field is no longer than 2 decimal places. This works fine as long as there is a number is the field but when the field is blank (null) it produces an error. I've tried different code to get round this without success. Can someone help...
  3. A

    Select top 5 from query

    Thanks GalaxiomAtHome . . Unfortunately that doesn't work . . I get syntax errors when I try that. . I wish it were that simple ;)
  4. A

    Select top 5 from query

    I have the following query. I'd like to show/select only the top 5 records. Can anyone advise me on how to do this? SELECT DISTINCTROW PYVOAP.[AP Code], PYVOAP.[AREA OF PRACTICE], PYVOAP.[File Number], PYVOAP.[Client Surname], Sum(PYVOAP.Costs) AS [Sum Of Costs] FROM PYVOAP GROUP BY PYVOAP.[AP...
  5. A

    Rounding numbers in a form

    This works fine now. Thanks so much again Private Sub Payment_Amount_BeforeUpdate(Cancel As Integer) DotLoc = InStrRev(Payment_Amount, ".") If DotLoc <> 0 And (Len(Me.Payment_Amount) - DotLoc) > 2 Then MsgBox "This field must be input to no more than two decimal places" Cancel = True...
  6. A

    Rounding numbers in a form

    Sorry John . . . Just a small problem Now when I enter a number without a decimal point I get the error message. Example: If I enter 250 and not 250.00 I get the error message. Any ideas?
  7. A

    Rounding numbers in a form

    Works perfectly. Thanks so much.
  8. A

    Rounding numbers in a form

    I know this might be quite simple for some people but I can’t figure out the code that checks the value entered in a text box on a form to ensure that it does not exceed 2 decimal places. I want to achieve this using code and not by an input mask or by changing ‘Decimal place’ to 2. (The reason...
  9. A

    Set focus when new form opens

    Changing the Tab order doesn’t work The new data is sent from the previous form to the new form using the folllowing code in the NotInList event: DoCmd.OpenForm "NewClient" Forms!NewClient![File Number] = NewData The ‘New Form’ OnLoad Event has the following code to select a new record but...
  10. A

    Set focus when new form opens

    I have a ‘Not In List’ event that opens a new form and inserts the new data into the first control/field and sets focus to that control. This works fine but I want the focus to be set to the next control so that the first control with the new data doesn’t get overwritten. I’ve tried ‘set focus’...
  11. A

    Num Lock Turns off at random

    I’ve got an access database program that has been working perfectly for years on my old PC which was running windows XP. I have recently changed my computer to one that runs Vista and installed my access program on it. The problem I have is that when I switch between other programs or other...
  12. A

    Copy Cell Above and Add 1

    Thanks for you help Pat. I understand what you are saying but clearly there is a need to copy the cell above within Access otherwise Microsoft wouldn’t have created the Ctrl+’ function. Anyway. My code works for me . . .So I’ll use it :)
  13. A

    Copy Cell Above and Add 1

    Thanks Pat What I am trying to do is create a cheque writing programme. In the datasheet I referred to I will enter the details of the cheques I want to print. The field I referred to is the cheque number field. It would be handy, when entering the next cheque, if I could just hit a button that...
  14. A

    Copy Cell Above and Add 1

    I have a subform in Datasheet view. One field contains numbers. When entering data into the datasheet I wish to copy the number from the cell above and add 1. Can anybody help me with the code to do this?
  15. A

    Help With Loop

    Thanks RV but it’s a bit out of my league I’m trying to do something like this but it doesn't work. Can anyone help? Private Sub Command43_Click() Dim Check, Counter Check = True: Counter = 2000 Do If Counter = (DLookup("[File Number]", "ClientList", "[File Number] = Counter")) Then Counter...
  16. A

    Help With Loop

    The data was originally entered into the table from a spreadsheet.
  17. A

    Help With Loop

    I am trying to write some code that will search my database and generate the next available file number when I click a button on my form. Table = Client Details; Field = File Number Example File Number 1000 1001 1002 1004 I am trying to generate File Number 1003. I’ve tried different loops...
  18. A

    Help With Function

    Jason Thanks for your help and your email. I got it to work fine. The only problem is that if I enter the date manually after having used the +/- keys, the text box won’t allow me to do so. (It goes a bit weird and only allows me to enter a single digit.) Is this a problem that can be remedied...
  19. A

    Help With Function

    I found this Function on the Internet which uses Plus/Minus keys to act as spin controls in a numeric or text field. I have created a module but don’t know what to do next in order to make it work. Can anyone help? '**************** Code Start ************** 'Code Courtesy of 'Jason Looney '...
  20. A

    Line Number in Query

    Can anyone tell me how I can include a ‘Line Number’ field to a Query. I wish to add a field that increase by 1 for each record. (An Auto Number field won’t produce sequential numbers when it is filtered) Any help appreciated [This message has been edited by AlanW (edited 02-20-2002).] [This...
Back
Top Bottom