Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by leadadmin

  1. leadadmin

    Duplicate Record on Add

    I thank you for all your help. But I just found that we're not done: my dup edit works too well. I get the dup error message on any new record I try to add, even if it is not a duplicate. In my BeforeUpdate procedure I have a series of required field edits, which is followed now by the new...
  2. leadadmin

    Duplicate Record on Add

    Hooray! It works! One little thing: all the data entered on the form is blanked out when the error appears. This is desired when it fails any of the other edits in this procedure, but I'd like the data to stay on the form for just this one. How can I do this?
  3. leadadmin

    Duplicate Record on Add

    Dim db As DAO.Database, rst As DAO.Recordset Dim strMsg As String, Style As Integer, Title As String If (Len(Me!ContactLastName & "") > 0) And _ (Len(Me!CompanyName & "") > 0) Then Set db = CurrentDb() Set rst = db.OpenRecordset("Customers", dbOpenDynaset)...
  4. leadadmin

    Duplicate Record on Add

    My table has two fields used as the key, ContactLastName and CompanyName. If the user attempts to add a duplicate record using my form I would like a custom error message to display and the record not added to the table. I tried following advice given for a previously asked question in this...
  5. leadadmin

    Print Current Record on Form Before Add

    Thanks for hanging in there with me. We would always want to add the record, and would sometimes want to print it. The report I wrote prints a record in the table; when designing it I did not see a way to print it from the form before adding it to the table. So that implies the record must be...
  6. leadadmin

    Print Current Record on Form Before Add

    I saw this from someone's previous question and tried it but had trouble with it. Can I only print the record after it has been written to the table? Please look at my question again to help me understand this. Thank you
  7. leadadmin

    Print Current Record on Form Before Add

    My Customer form has an "Add Record" button that writes the new record to the table. I would like the user to have the option of just adding it or adding and printing that current record (and not all the records that have been previously written). What is the best way to handle this? My "Add...
  8. leadadmin

    printing current record

    Please disregard my reply...I inadvertently replied to yours instead of posting a new question. sorry!
  9. leadadmin

    printing current record

    I have a form with an "Add Record" button. We want to print the contents of the form from the current record before adding it to the table. When I write a report to print the current record and invoke it by clicking a print button, it can't find the record because it hasn't been written to the...
  10. leadadmin

    Custom error msg for Req'd Field

    Here is my Add Record code: Private Sub Add_Record_Click() On Error GoTo Err_Add_Record_Click DoCmd.GoToRecord , , acNewRec Exit_Add_Record_Click: Exit Sub Err_Add_Record_Click: MsgBox Err.Description Resume Exit_Add_Record_Click End Sub Thanks!
  11. leadadmin

    Custom error msg for Req'd Field

    PH: I tried your suggestion and still got the same results. First I get my good error message "Missing data...", but then I also get the "Can't go to specified record", then I can enter the req'd data. his is what my code looks like: Private Sub Form_BeforeUpdate(Cancel As Integer) Dim booOkay...
  12. leadadmin

    Custom error msg for Req'd Field

    Willir, Thanks so much. That worked beautifully. Two things, though: (1) my custom message appears, I click OK, and a second error message "You can't go to the specified record" opens. I click OK and I can then enter the required field. How do we stop the second message from appearing? (2) I...
  13. leadadmin

    Custom error msg for Req'd Field

    I have a simple form for a simple table. The first several fields are required, which I did at the table level. I have 2 problems: (1) If I do not enter all the req'd fields and click my "Add Record" control button, I get the error "You can't go to the specified record". I would prefer to...
  14. leadadmin

    Current Inventory Level Calculation

    That did the trick! Thank you very much.
  15. leadadmin

    Budget Balance Calculation

    Great! That worked just fine. Thank you.

Part and Inventory Search

Back
Top