Search results

  1. I

    Beginner trying to set table values from VBA

    I have now tried to use recordset, extracting the framework from others in the forum, but I get a Compile error: User defined type not found for the dim'ing of the Database! The code is: Private Sub form_current() Dim db As DATABASE '-----> error here! Dim rs As Recordset Set db =...
  2. I

    Beginner trying to set table values from VBA

    I have been looking through this forum trying to find out how to edit a table from a piece of form VBA. I get the feeling I have to use recordset, but I have no idea what recordset does. In brief, I store a list of numbers in a table text field: 13;12;32;114;542;2 this corresponding to a set of...
  3. I

    Passing form fields between subroutines

    Thanks for the reply! This might be another case of doing things arse-about-face (I am a very new to this stuff), but the reason why I need to pass the textboxes themselves (and not the contents) is because I need to do operations on the textboxes. In summary: I have 10 sets of textbox pairs...
  4. I

    Passing form fields between subroutines

    Hi all, I'm trying to streamline what I can see as being repetitive code in a form. To get rid of the code repetition, I will need to pass textboxes as arguments between subroutines. So my problem is now this: How do I declare a textbox when I pass it between subroutines?
  5. I

    Form clearing Error

    I've played a bit more with my forms and have been testing them out, and i've come now to the conlcusion that Me.undo is actually perfect. Sorry to have wasted your time out there. But thanks. And a message to all using this forum: The info here is tremendous AND USEFULL. Without the data...
  6. I

    Form clearing Error

    Good point. If there is a previously valid entry, the only reason why the user will be changing it is because its a mistake. Once they get to THAT point, I didn't want them to have the option of returning to the previous entry by having the field cleared completely.
  7. I

    Form clearing Error

    The Me.undo statement is not thorough. It only pushes back to the last entry (which might not be blank). I need to ensure a clean field. This is frustrating -which I now think might be a way of life for access programmers. I looked up this problem on the Microsoft Website, and this error is...
  8. I

    Form clearing Error

    I've tried a different approach by using the sendkeys statement... It's a VERY sloppy fix though and I don't like it. But it works. Kind of. If Answer = vbYes Then Cancel = True SendKeys "{backspace}{backspace}{backspace}{backspace}{backspace}{backspace}" End If Any...
  9. I

    Form clearing Error

    Thanks for the vbcrlf tip. I get the error either way I put the cancel=true line. Here is stripped version of my code that gives the same problem.... Private Sub Part1_BeforeUpdate(Cancel As Integer) Dim Answer As Variant Answer = MsgBox("Cancel Entry?", vbYesNo, "Our Box") If...
  10. I

    Form clearing Error

    Validation won't work in this case. So, Ok -Here's the code. I thought of streamlining it in the string section, but I thought the newline trick might be of use to others out there. Private Sub Part1_BeforeUpdate(Cancel As Integer) Dim Answer As Variant Dim bit As Variant Dim NewLine As String...
  11. I

    updating a form

    If a checkbox is ticked, or a field is filled on servicing why not build a query based on the servicing field being false or empty? From there you can quickly generate a report based on that query.
  12. I

    Form clearing Error

    I am new to Access2000 (5days) and have a problem with field clearing. I have looked through your postings throughout this time and have found them a great asset. I now have a problem I have not found a working solution for: I have a form field which checks via the BeforeUpdate code to see if a...
Back
Top Bottom