Search results

  1. Ally

    Update field in a table using VBA ?

    Hi - here's a rough way of doing it. There may be easier or tidier ways but Col worked this out and just did a lesson with me and he's just gone home so left me to post it! Function UpdTblField() Dim db As Database Dim r As Recordset Dim x As Integer, y As Integer, z As Integer...
  2. Ally

    Selected Month Report

    Please be patient. We mostly all have other work to do. If you're going to do it with a drop down box, you need to get rid of the month table. It has no relevance to your other tables. Also, you shouldn't use names like 'date', 'month', 'year' etc as field names as they confuse Access as they...
  3. Ally

    Selected Month Report

    There's a variety of ways you can do this. In a query, under the date field, you'll need to put in the Criteria row, Between [Enter Start Date] and [Enter End Date] Therefore when your query is run, for March, you would enter 01/03/04 (or 03/01/04 depending on whether your settings are US...
  4. Ally

    disabling mouse scroller

    If you do a search on the forum for this, you'll find a fair number of posts, especially this one which has some samples.
  5. Ally

    Data Conversions

    Thanks John Think I'll go for the "preferred" and ultimately easier option of not allowing them to get there in the first place! (The line of code being in there twice was from me trying to get my syntax right and forgot to delete it).
  6. Ally

    Data Conversions

    Thanks for your reply John. Phew - here's a very cut down version of the db - in Acc '97. Had to delete loads of stuff to get it to fit. Go to frmCustomer and view Order from the subform. The Save Data command button is where the code is. If any of the fields are null, I want it to say so...
  7. Ally

    Data Conversions

    Just tried: rst![UnitPrice] = CCur(Nz(Me.txtCost, 0)) but same error again.
  8. Ally

    Data Conversions

    The Nz code itself doesn't error, but the same error message on the same line comes up.
  9. Ally

    Data Conversions

    That works generally but ... I'm still getting data-type conversion error when fields are left blank, on the line: rst![QuantityOrdered] = Me.txtQuantity
  10. Ally

    Data Conversions

    "Variable not defined" if I just remove the Dim x etc. If I remove the x= etc, I then get "invalid use of property".
  11. Ally

    Data Conversions

    The fields on the form are unbound and OnClick of the Save Data button, the values in the fields are assigned to the x, y, z etc. x = Me.OrderID.Value y = Me.txtItemSelect.Value z = Me.txtQuantity.Value c = Me.txtCost.Value d = Me.txtNumberSent.Value e = Me.txtBatchNo.Value f =...
  12. Ally

    Data Conversions

    Variables for the fields in the table.
  13. Ally

    Data Conversions

    Thanks Rich. I hadn't, but just tried. No change unfortunately.
  14. Ally

    Data Conversions

    I've got some code on a form, that posts fields to a subform, (therefore a table). There is code (in a module) to trap whether any fields have been left null, but if there are, I'm getting a data conversion error for some of the numeric / currency fields. So rather than declaring them as...
  15. Ally

    Autocorrect

    Excellent - thank you Pat!
  16. Ally

    Autocorrect

    I've just been asked by a user if there's any way of incorporating the autocorrect option within Access from a file from Word, ie, they've downloaded the Word doc with all the autocorrect features into a document, including all the ones they've added specifically for the medical secretaries...
  17. Ally

    What's your best/worst joke?

    ? Depends ????? :confused:
  18. Ally

    Disabling / Hiding X with pbool function (referring to other post)

    Thank you - Can you explain what you mean by "toggle to value to the subforms" please Rich. I asked Col and he wasn't sure either, so that makes me feel a bit better! Also, do I keep the If IsNull etc code on the unload event too?
  19. Ally

    Disabling / Hiding X with pbool function (referring to other post)

    Sorry ... but the test db isn't working for me! It just closes when I click the 'x' with no message and if I try and enter anything, it won't, (as it's read-only I presume).
  20. Ally

    Disabling / Hiding X with pbool function (referring to other post)

    Doing it on BeforeUpdate causes the msgbox to appear every time you try and enter something else in other fields. It's on the second "page" of a form, so there's plenty to enter before you get there.
Back
Top Bottom