OK I am trying to figure out how to do this. I have a subform that brings in my table data via text boxes. They are all hyperlinked except for one field. The hyperlinks open xls files outside of the Access program. What I need the other field to do is for the user to click on the text box and have it open a table within Access. I know hyperlinks can be set up manually for these data fields, however these are updated monthly and there are over 2,000. Is it possible to set up vba to look at the text box field and to determine which table to open for the user? I am really stuck on this one, not sure even how to google this question.
Sorry if I didn't explain correctly. The subform is being populated by a table with 7 hyperlinked fields and a normal text field. The hyperlinked fields link correctly to xls files that are sitting on my computer. The trouble starts with the text field. I want to be able to click on for example Batters_20, and that will bring up my Batters_20 table, or if I click on Pitchers_14, I want that to bring up my Pitchers_14 table. So I want Access to hyperlink this table field to open other tables.. I know how to do this by right clicking the field and navigating to the "Other objects in this project" and assigning it manually.. however I need to figure out a vba statement that can automatically open these links since these tables will be updated monthly.
Thank you I understand the logic behind that, however I want code that will give me an if, then, else statement.
For example, (mind you not the right syntax)
if me.textbox1.value = 'Batter_20' then DoCmd.OpenTable "<Batter_20>", acViewNormal, acEdit
if me.textbox1.value = 'Pitcher_13' then DoCmd.OpenTable "<Batter_14>", acViewNormal, acEdit
else if me.textbox1.value = ' ' then (not sure how to end this.. just want to say do nothing)