Recent content by randolphoralph

  1. R

    Using And/Or within If statement

    Ok I feel so dumb....I found out what the issue is....I should have been using AND instead of OR. Below is the code that ended up working. ElseIf (Len(Nz(Me.Associate_name, "")) = 0) and (Me.Status <> "Expired") and (Me.Status <> "No longer eligible") Then I get very confused when...
  2. R

    Using And/Or within If statement

    Mihail I tried as you suggested on both parts of the formula and it works when I use only one part, but as soon as I add them together with the OR it does not work. ElseIf (Len(Nz(Me.Associate_name, "")) = 0) And (Me.Status <> "Expired") Or (Len(Nz(Me.Associate_name, "")) = 0) And (Me.Status...
  3. R

    Using And/Or within If statement

    After removing the Nz neither part of the formula works. I am ok with leaving the Nz as is, but just have to figure out how to make the 2 parts work together.
  4. R

    Using And/Or within If statement

    Ok I have tried the second part of the formula and it works as shown below. I am not getting an error message when I use both parts of the formula, but the issue is that the code will return the message box regardless of field values. ElseIf (Len(Nz(Me.Associate_name, "")) = 0 And Me.Status...
  5. R

    Using And/Or within If statement

    I am having some issues trying to use both and & or in a If statement. The code below is what I am trying to do and it is not working. ElseIf (Len(Nz(Me.Associate_name, "")) = 0 And Me.Status <> "Expired") Or (Len(Nz(Me.Associate_name, "")) = 0 And Me.Status <> "No longer eligible") Then...
  6. R

    Runtime error 2105

    I found the solution. Using the Form After Insert event Me.AllowAdditions = False with the Form Property Allow Additions = No
  7. R

    Runtime error 2105

    I have tried Form Current event Me.AllowAdditions = False same error and debug.
  8. R

    Runtime error 2105

    After I put in Forms After Update event Me.AllowAdditions = False I get runtime error 2105 and the debug points to DoCmd.GoToRecord acActiveDataObject, , acNewRec That is the issue I was having initially.
  9. R

    Runtime error 2105

    I just realized that the code works, but does not set Me.AllowAdditions = False after the new record is added....so after the first time the command button is clicked users can add new records without having to use the command button. If possible I would like for the following to happen when...
  10. R

    Sub form

    I spoke too soon...I have both the Master and Child set to SalespersonID and it still has the same issue. The subform is blank on a new record, but as soon as I type in the 1st field the subform populates with data from the last record.
  11. R

    Sub form

    Thanks Pat...Looks like I had misspelled on the field name on the Child.
  12. R

    Sub form

    I have a form that contains order information with the salesperson id. At the bottom of the form I have a subform which displays all the records (orders) of the unique sales person based on the salesperson id that is entered on the record. Once the salesperson id is entered I am running an...
  13. R

    Runtime error 2105

    bob fitz....you are correct....I set the Allow Addition = No and removed the On Current and used only your code and it worked. Thank you bob fitz and Catalina!
  14. R

    Runtime error 2105

    I tried that and it still gives me the error. I seem to be getting a little closer. Ok I verified I have Allow Additions = Yes under form properties, and get the error using the code below. Private Sub Form_Current() Me.AllowAdditions = False End Sub Private Sub All_Load_Click()...
  15. R

    Runtime error 2105

    I tried it and I am getting the same error and debug.
Top Bottom