Forum Discussion

fishylizard's avatar
fishylizard
Copper Contributor
Jan 13, 2025

Autofill data

Hey, is there a way to autofill some values in access based on a combination of other fields? Like essentially with VLOOKUP in excel. Specifically, I'm trying to autofill Latitude and Longitude fields based on a combination of Bay (location) and a Waypoint number for where we set nets in a lake. 

I have a deployment table I'm trying to fill everything in, and the only reason I need Lat & Long in that table vs just having it in the Waypoint table, is sometimes we set nets not along a waypoint and I want to be able to enter those coordinates. 

Attached are pictures of part of the Deployment form and the Waypoint table

 

  • If I understand correctly, Waypoint should also be a combobox, and restricted to the values for the selected Bay. That is called "cascading combobox" if you search for it online.

    Once you have that, then Waypoint combobox can have two additional hidden columns with Lat and Long, and those controls can have a ControlSource of:

    =Waypoint.Column(2)
    =Waypoint.Column(3)
    Assuming Lat and Long are in columns 3 and 4.

  • If I understand correctly, Waypoint should also be a combobox, and restricted to the values for the selected Bay. That is called "cascading combobox" if you search for it online.

    Once you have that, then Waypoint combobox can have two additional hidden columns with Lat and Long, and those controls can have a ControlSource of:

    =Waypoint.Column(2)
    =Waypoint.Column(3)
    Assuming Lat and Long are in columns 3 and 4.

    • fishylizard's avatar
      fishylizard
      Copper Contributor

      Thanks! That got me a lot closer, except I'm running into the problem of, like I'll have two "Waypoint 24" (one in Windy Bay, one in Hidden Lake for example) but once I select WP 24, I still get coordinates for both locations in my Lat/Long boxes

Resources