Search results

  1. F

    Type Mismatch

    I've been working on this for hours and you did it in what, ten minutes. I don't whether to be elated or angry (just kidding). I really appreciate your patience. It would have been easier to upload the DB initially, but then I wouldn't have been able to try and figure it out. Thank you...
  2. F

    Type Mismatch

    Bob, here's the stripped down version. the form that opens is the one that i'm having the issue with
  3. F

    Type Mismatch

    Ah, ok. Sorry. I had a very Sherlock Holmes moment. All for nothing. Anyway, I did the verification you recommended and everything checks. I moved the second part to the first and it will evaluate the Aname box but the not the Cmgr. I just can't figure out why it's only "seeing" the...
  4. F

    Type Mismatch

    Bob, I noticed something interesting in the code, which is preventing it from executing the second part, or the right part, of the AND statement. By the way, the code now executes, not sure why it wasn't before. strval = "Cmgr = '" & Me.[CMgr_cmbo] & "' And AName = '" & Me.AccountCmbo &...
  5. F

    Type Mismatch

    Hey Bob, Fixed the code based your change. Now, when I click on the button, nothing happens. :( I've built in an else statement so that if the condition isn't satisfied, a form opens up (this is just so i can tell whether the code is working). When I leave one of the boxes blank, the form...
  6. F

    Type Mismatch

    Bob, Thanks. I put that in there, however, it comments out part of the code: strVal = "Cmgr = '" & Me.[CMgr_cmbo] & "' And AName = "'" & Me.AccountCmbo & "'" I played around with the code but can't get it to work properly
  7. F

    Type Mismatch

    I think I understand your comment. I split the code and tested each one independently, i.e., Cmgr and then the AName. The code worked. However, when I put the AND between them, I get Type Mismatch. I still don't understand why it would work independently but not together?
  8. F

    Type Mismatch

    Thanks for the quick replies: Bob, I used the debug.print and verified the values are being returned properly. Gemma/Dave, yes, there is a boolean check that occurs. here is the full code: If Not IsNull(Me.CMgr_cmbo) And Not IsNull(Me.AccountCmbo) Then strVal = "Cmgr = '" &...
  9. F

    Type Mismatch

    Bob, I did what you suggested but still can't get rid of the type mismatch error.
  10. F

    Type Mismatch

    Hello All, I can not figure out why I'm getting a Type Mismatch error with the following code. Any help/insight is appreciated. If Condition then Val = ("Cmgr = '" & Me.[CMgr_cmbo] & "'") And ("Aname = '" & Me.AccountCmbo & "'") Else Do Something Else End If Val is a string...
  11. F

    AND Statement Not Working

    I realized after I wrote that, there would be a little confusion. Mainly, because I wasn't very clear, sorry. Yes, I had to put parenthesis around both conditions and it seems to now be reading it as one.
  12. F

    AND Statement Not Working

    James, Close. I put () around them and it seems to be working fine now. Thanks
  13. F

    AND Statement Not Working

    Hello All, I know I've done this before and am pretty sure I have something small missing from the code. In the below code, only the first part of the IF statement is working, i.e., it evaluates the left of the AND statment and ignores the right. I've switched it round with the same results...
  14. F

    Calculating Date based on Day & Time

    Thanks Paul, That was just the nudge I needed. Works fine.
  15. F

    Calculating Date based on Day & Time

    I've searched the threads and even tried to find the answer on the Internet. If I missed the solution, I apologize. I've been looking to the point where it has all know become mud. Here's what I want to do: [RDate] is a field on the form that essentially will be the request date. When a...
  16. F

    Passing Value to Primary Key

    Good call. The property was set to YES. I found it and changed it before your reply and that's when I started getting the duplicate value error
  17. F

    Passing Value to Primary Key

    Been playing around with the code and now I get the error that the changes requested would create duplicate values in the primary key...etc. Note: I can't have duplicate entries.
  18. F

    Passing Value to Primary Key

    Found out an error in the code and fixed that but still get the "can't assign value" error on the Load event
  19. F

    Passing Value to Primary Key

    i dropped it in and the form opened but the value wasn't passed. no value was entered. I'll keep playing around with the code. any other ideas are welcomed
  20. F

    Passing Value to Primary Key

    Must be doing something a bit off. I am still getting the "can not assign value" error. Here's what I have: On the main form, in the onclick command of the button: DoCmd.OpenForm "frm_construction", acNormal, , , , , Me.Vendor Then on the second form in the On Open event: If Not...
Back
Top Bottom