Search results

  1. W

    DLookup Question

    I am using DLookup in a form, and I was wondering if it is possible to have more than one condition for it. For example, I am using this one: Account2.Value = DLookup("acct_num", "[AMS_Accounts]", "acc_lnk_id=" & Link_ID) Can I create a Dlookup that populates Account2 with acct_num when...
  2. W

    Noob needs help with DLookup function in form

    Yeah, its still isn't working. Its as if I need to do the dlookup first, then set the value to the product of the dlookup. It seems like it compares acct_num to Account1, then just runs a dlookup that can produce anything - which can result in a duplicate. Does that seem to make any sense?
  3. W

    Noob needs help with DLookup function in form

    Okay, so I messed around with your suggestion, and came up with this: If acct_num <> Account1 Then Account2.Value = DLookup("acct_num", "[AMS_Accounts]", "acc_lnk_id=" & Link_ID) End If If acct_num <> Account2 Or Account1 Then Account3.Value = DLookup("acct_num", "[AMS_Accounts]"...
  4. W

    Noob needs help with DLookup function in form

    Doesn't work because Account2 starts off null and should be populated from Account1. But it didn't give me any errors. :)
  5. W

    Noob needs help with DLookup function in form

    So far what I have for the additional issue: Account2.Value = DLookup("acct_num", "[AMS_Accounts]", "acc_lnk_id=" & Link_ID) But how do I make it conditional. I only want it to populate a value for Account2 if it does not equal Account1. Suggestions?
  6. W

    Noob needs help with DLookup function in form

    I thought about that, would the combo box only populate from the row that Account1 is assigned to? Another function I need to put in is the ability to populate any related accuonts. Each account of a particular client is assigned a link# to relate them together. Something like: Link#...
  7. W

    Noob needs help with DLookup function in form

    Fantastic - it now works. Thank you soo much. I may have more questions coming.
  8. W

    Noob needs help with DLookup function in form

    Any chance this looks right to you? FirstName.Value = DLookup("holder_first_name", "[AMS_Accounts]", "acct_num=" & Account1 & "'")
  9. W

    Noob needs help with DLookup function in form

    Alright, I'm getting much closer now. The only error I get is a data type mismatch - which I haven't identified yet. Thanks. As far as I can tell, First.Name / holder_first_name / acct_num / and Account1 are all TEXT. Any suggestions?
  10. W

    Noob needs help with DLookup function in form

    You are exactly right. But once that VBA editor opened up, I realized how out of my league I am. This is what is originally in VBA: Private Sub btnAcctLookup_AfterUpdate() End Sub Where do I put? =DLookUp("holder_first_name","AMS Accounts","acct_num=" & Account1):
  11. W

    Noob needs help with DLookup function in form

    Well, I've gotten rid of the spacing, but and tried it with an unbound text box, but I still get the error that Access is looking for a macro named Account1. Any idea what that is about?
  12. W

    Noob needs help with DLookup function in form

    Thank you very much, I believe this puts me in the right direction. One problem I experience is that the form comes up with #deleted in every field, and won't let me update it, and shows this warning: Microsoft Acces can't find the macro "First Name".... Here is the code I used: First...
  13. W

    Noob needs help with DLookup function in form

    Since the original problem seems to be fixed, I'll add my similar problem to this thread. Basically I have a form that includes fields such as account number, first name, last name, address, etc. I'm hoping to find a way so that when the user enters the account number into the field, the...
Back
Top Bottom