the easiest way to do this is to set the control source of the ActiveRecordNameTextBox to an expression. Experience tells me you probably tried this but had trouble referring to the subform. I always have to use areference when I refer to subforms. Here is a reference that also gives some explanation: https://www.fmsinc.com/tpapers/primer/index.html
if and only if is a natural choice for the expression given you want to select between two values. So if you want to refer to the subform controls use something like:
You could also refer to the subform recordsource fields directly. Also when refering to a subform from the mainform you can use relative references to get:
Note since you weren't explicit about the edge cases Like what to do if you have both a BusinessName and a PrimaryContact I just picked displaying the BusinessName if available and nothing if both where blank.
- MS Access 2013 - How to Trigger an Event on an Automatically Updating Textbox
- MS Access 2013 event trigger in module, not class module
- ADODB doesn't exist in Access 2013 project, how do I add a reference to it
- Access 2013 VBA - Setting New Click Event for Controls
- Excel VBA: How to trigger an Event from code?
- How to return a description with the form_error event in MS Access
- How can I trigger an event when multiple items added at once to Outlook Folder?
- Access 2007: How can I get the onclick event of a Treeview checkbox?
- Access VBA - Trigger combobox change event
- How to automatically trigger the App Object initialization in Powerpoint?
- How to Select All Text in TextBox After textBox.Setfocus Using Access VBA
- How to fix a cell that is not automatically updating due to a macro
- Updating an Access Table with a CSV File Automatically
- How to get keyboard 'Enter' to trigger button press on Access form?
- How do I access some sort of OnLoad event in Word 2007 VBA?
- How to trigger a click in Access database form from Excel VBA code
- How to trigger BeforeUpdate event on a checkbox only?
- Access 2013 - Save Value from Textbox and display again when form is opened after close
- How to call an afterupdate event from another module/control event (MS ACCESS VBA)
- Need to Automatically Edit Access TextBox in SubForm after SetFocus
- How to trigger a specific web page event with a vba macro
- How to detect what control triggers BeforeUpdate event in Access 2007
- How to trigger right mouse click event handler in Word 2016?
- MS ACCESS VBA: Me.Dirty = False OnTimer Event Reverts Edited Textbox Data
- Why would Access 2010 not trigger the form unload event when browseto is invoked from subform, instead of parent form?
- How to set a textbox to enabled on event
- MS Access 2003 - Message Box: How can I answer "ok" automatically through code
- How to cycle through Textbox Controls Access VBA
- How to Trigger MS Access Code based on specific time of day rather than every second or minutes
- How to create Access textbox that I can just type into?
More Query from same tag
- Prompted with Object doesn't support his property or method
- Excel custom data validation use own made function
- Outlook 2007 Task Saving Problems
- Setting a constant from a variable value
- How can I use the 'TimeIff' function in VBA to subtract a specific time from a user entered time in a userform?
- Worksheet_change shows date as FALSE
- Reverse loop but skip first condition?
- Copypaste multiple rows and columns, but change data of the first column only
- Parsing XML Response in VBA and extracting only last data
- (Condition) in SUMPRODUCT WorksheetFunction
- Truncating actual values in VBA
- Processing and displaying large amount of data in Java
- Excel VBA extract substring based on InStr and paste into worksheet2 loop for all cells in column
- Find column headers by name and select all data below headers from multiple workbooks and paste the data one below other in master file in excel VBA
- How to jump to worksheet by typing partial name
- Copy values across relative worksheets
- Access + VBA + SQL - How to export multiple queries into one excel Workbook, but, multiple Worksheet using the criteria from a table
- Why does this IF statement not require an End IF
- Parsing full content of Word document with Excel VBA
- Excel VBA UserForm- If Not IsEmpty Then
- VBA Excel - Pass Worksheet and Range as Parameters
- How do you add a help button to Excel userform
- Importing Files csv from Folder into single sheet
- VBA Error: 'Range' of object '_Global' Failed
- Inserting rows at end of excel table macro - Method range of object _global failed
- How to create a manipulated CSV file from XLS using VBA
- Passing table name and field name as strings to function
- Access VBA Replace function returning values from Replace string
- How to add a label and textbox based on combo box selection on a userform in excel
- optional parameters on report