Search results

  1. I

    Close form without saving record?

    Thanks for adding the info about saving the form not the record that os good info and I agree with the last guy as well, people are smart enough to know the difference between "close form" and "add record"
  2. I

    Close form without saving record?

    It does work. When I want to add a record I push the "Add Record" buttoon instead of the "Close Form" button which is intended to close the for without submitting the data wether the fields are filled in or not. I will look through the validation stuff thanks for the tip.
  3. I

    Object Required Error

    Here is the code i used that fixed it. I don't know if its the simplest but it worked. I did need to add a Boolean aspect to make the non module subroutine work as well. Code: Public Function CheckPhone(strCheckPhone As String) Dim boolPhone As Boolean If Len(strCheckPhone) <> 7...
  4. I

    Object Required Error

    I tried it and it doesn't make the difference... It actually seems to make no difference which is interesting. I think it doesn't know what form to find txtPhone on or something like that but Im not sure how to refer to it more directly... maybe i can find that on the forums somewhere... Let me...
  5. I

    Object Required Error

    Well I solved the last one but now Im stumped again. The following code is in my functions module I am creating to check the data in the form is correct before inserting the new record. Public Function CheckPhone(strCheckPhone As String) If Len(strCheckPhone) <> 7 Then MsgBox ("The...
  6. I

    Close form without saving record?

    Ok I solved this myself but it took a long time to figure out so I will post it here in case anyone else has this problem and reads it. The simple answer is before your "DoCmd.Close" you need to put the statement "Me.Undo" that's it quick and painless then it doesnt matter what info is in the...
  7. I

    Close form without saving record?

    Im very new so this could be a dumb question but here goes. I have a form which adds records to a database of donors. On the form i have a close form button with the code that follows - DoCmd.Close acForm, "Add Donor Form", acSaveNo whenever the close button is pressed it saves the record to...
Back
Top Bottom