Code:
Dim conn As ADODB.Connection
Dim rst As ADODB.Recordset
Dim strSQL As String
Set conn = CurrentProject.Connection
Set rst = New ADODB.Recordset
strSQL = "Select fileName from tblTest"
rst.Open strSQL, conn
Do Until rst.EOF
Debug.Print rst("fileName")
placeHolder = Forms![Form1]![Slave].Value
MsgBox rst("fileName")
Forms![Form1]![Master].Value = Replace(placeHolder, "_Main", rst("fileName"))
rst.MoveNext
Loop
rst.Close
Set rst = Nothing
conn.Close
Set conn = Nothing
End Sub
And I want
Code:
placeHolder = Forms![Form1]![Slave].Value
MsgBox rst("fileName")
Forms![Form1]![Master].Value = Replace(placeHolder, "_Main", rst("fileName"))
To show each fileName in the textbox Master on my form, not overwrite.