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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  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.
  16. leadadmin

    Current Inventory Level Calculation

    Wonderful! I did exactly as you outlined and it works beautifully. Thank you so much. Just one minor snag: if there are no Purchase records (and, hence, no purchase qty) for a part number, when I subtract purchases from counted qty to get my current inventory level by using =[Qty On...
  17. leadadmin

    Budget Balance Calculation

    I'm trying to create a report that shows a manager's beginning budget in the group header, purchases against the budget in detail lines, and then ending budget balance in the group footer. The data is from a query, which includes a calculated cost value of each purchase of Expr2...
  18. leadadmin

    Current Inventory Level Calculation

    I have an Inventory table which contains partno, inventorycount, and countdate from the last physical inventory taken. I also have a Purchases table, which contains partno (same as in Inventory table), purchaseqty, and purchasedate. I want to create a report that shows my current inventory...
  19. leadadmin

    Abs(Sum....) displays blank when zero

    Thanks so much. That did it. But now I have the same problem with a percentage calculation on those fields. This is what I have (using my old abs(sum) expression): =Abs(Sum([fldname1]="Y"))/Abs(Sum([fldname2] Is Not Null)) where fldname1=0, fldname2=1. Sometimes the zero result of...
  20. leadadmin

    Abs(Sum....) displays blank when zero

    In order to show only counts I have a report which displays only a group footer and page footer. One field in the group footer counts the number of times a field equals a given value. I am using the =abs(sum{fldname]="X")) expression. When the group count equals zero, on some lines it...

Part and Inventory Search

Back
Top