I have code in my form to print preview a report.
I would like to move to a new record in a subform after the report is opened.
I have tried to enter this code at the end of the open report code:
Me.frmToDoListEntryLinks.SetFocus
DoCmd.GoToRecord , , acNewRec
I get a Run-time error...
I'm trying to filter a subform based on a value on the main form.
I'm filtering on 2 fields.
One is Job.
The for the second field, I want all the records that have the same characters prior to the 1st "R" in the string.
Here is the code.
If InStr(Me.ContractorNumber, "R") > 0 Then...
New similar issue.
This INSERT INTO is not working.
The problem seems to be with the Note field; if I change Note to a different field in the tblSubmittalNotes the sql works just fine.
strSql = "INSERT INTO [tblSubmittalNotes] ( SerialNumber, Note) " & _
' "SELECT...
I have a simple problem that has me stumped.
I'm trying to add data to a table with an input into Sql string. I get a syntax error missing operator in the query expression '25r1'.
25r1 is the value of strCN.
lngID is a number, the other items are strings.
strSql = "INSERT INTO...
I modified Allen Browns code to allow the user to select an old parent record from a combo box, then click a button to enter the data into a child form.
Private Sub cmdCopyCriteria_Click()
'On Error GoTo Err_Handler
'Purpose: Duplicate the criteria from a past submittal (in combobox...
Thanks!
Well, looks like I had the wrong name for the subform. Fixed that.
Did the step through next.
It seems like the code keeps looping through the loop. It adds the e-mail address from the subform over and over again.
So I added the missing .MoveNext.
Thanks Colin!
Solved my...
Yeah, sorry for the confusion. Was trying to do too much at once.
frmSubmittalCriteriaNew is the subform
"Reviewer" is the control on the main from that has an e-mail address in one of the columns.
email is a control on the subform with email addresses as well. It is also the name of the...
OK. I modified the code.
mailto = Me.Reviewer.Column(1) & ";"
Debug.Print mailto
Dim rs As DAO.Recordset
Set rs = Me.frmSubmittalCriteriaNew.Form.RecordsetClone
With rs
Do While Not .EOF
mailto = mailto & !email & ";"
Loop
End With
Set rs = Nothing
Debug.Print mailto
The immediate...
Still doing something wrong.
Dim rs As Object
Set rs = Me.[SupplementalReviewer].Form.RecordsetClone
With rs
Do While Not .EOF
mailto = mailto & ![SupplementalReviewer] & ";"
Loop
End With
Set rs = Nothing
Debug.Print mailto
I get a compile error:
Method or data member not found.
It is highlighting "Form"
Dim rs As Object
Set rs = Me.Reviewer1.Form.RecordsetClone
With rs
mailto = mailto & ";" & rs
End With
I have a main for and a subform.
Both forms have the e-mail addresses of people on them.
On the main form, I have a procedure to e-mail a report to the person.
I would like to add a procedure to also e-mail the people on the subform, if there are any.
I think this would involve using...