Results 1 to 2 of 2
  1. #1
    IncidentalProgrammer is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2014
    Location
    Texas
    Posts
    156

    Expressions to populate one field based on combobox selection.

    I'm still having some troubles with my insurance claim entry form. I have a couple of comboboxes where users select the Account and then the Policy Number, and based on the policy they choose in that box, I have 5 text boxes that need to display some data about the policy. The text boxes are unbound because the data doesn't need to be changed on the table its coming from, or sent anywhere else because it would just be duplicate; these are just here for users to help verify that they're setting the claim up on the correct policy.

    The problem I'm running into is expression syntax. Right now, I'm trying to get the insurance company's name to populate in one text box, based on the policy number the user selects. It has to jump through some hoops to get it though, and that's where I'm messing up. Basically, it goes like this:
    The Company text box needs to display the Company Name found in the Entity table where the EntityID on that table matches the CompanyEntityID on the Policy table where the Policy Number matches what the user selected in the combo box.



    I'm then going to have to do pretty much the same thing with the policy type, status, and term (2 date fields) boxes.

    Does anyone know the syntax for that, or where to find some good examples? I tried the example on Microsoft's site, but that made the box flash #ERROR.

  2. #2
    IncidentalProgrammer is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2014
    Location
    Texas
    Posts
    156
    I tried creating a query to get the information I need from those two tables, and route the expression through that. I ened up with this:

    =DLookUp("[EntPrimName]","qryMnlClaim","[PolNum] =" & [Forms]![frmClmAdd2]![ctlPolNum])

    But it's still not working. Anyone see where I'm going wrong?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 06-20-2013, 10:35 AM
  2. Field visibility based on ComboBox selection
    By cactuspete13 in forum Forms
    Replies: 3
    Last Post: 01-30-2013, 03:37 PM
  3. Replies: 17
    Last Post: 01-11-2013, 01:53 PM
  4. Populate a text box based on a combobox selection?
    By Richie27 in forum Programming
    Replies: 4
    Last Post: 04-25-2012, 08:00 AM
  5. Populate a field based on combobox selection
    By rscott7706 in forum Access
    Replies: 5
    Last Post: 06-02-2011, 03:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums