I want to build a form that allows keyword searches using a textbox but don't know where to insert the "like" clause.
If Not IsNull(Me.txt_search) Then
Whereclause = "[Details] = '" & Me.txt_search & "'"
End If
Thanks
I have a form called frm_Mainform that is used to enter general information regarding the service of an instrument.
frm_MainForm
MainFormID <PK>
PersonPerformingService <Text>
Department <text>
ServiceDate <Date>
I now have a subform that contains:
sfrm_Instrument
InstrumentID <PK>
MainFormID...
I have a form, frm_Main, with three subforms. One of the subforms, sfrm_Service, contains a multi select list box. This list box shows all the possible repairs that can be done on a particluar instrument. I want the user to be able to click all that is done. I also placed a command button...
Aceman,
I modified the code as you suggested but now, a box prompting me for the "status" pops up. The code is listed below:
Dim stDocName As String, Whereclause As String, frm As Form, sfrm As Form
stDocName = "frm_ExternalAudit_View"
If Not IsNull(cbo_Auditor) Then...
I am using the following code to filter a form, frm_ExternalAudit_View, with a subform, fr_AuditDetails. The field that I want to filter is [Status] and this is found in the subform.
Dim stDocName As String, Whereclause As String, frm As Form, sfrm As Form
Set frm =...
I am so confused. When I use
Whereclause = "Forms!frm_Audit!frm_AuditDetails.Form![Status] = '" & cbo_Status & "'"
where frm_AuditDetails is the name of the subform. I get a blank form. WHen I use
Whereclause = "Forms![frm_Audit]![Status].Form![Status] = '" & cbo_Status & "'"
a message box...
I changed the code to because the name of the control is actually [Status]. I was using the subform name instead of the control name.
If Not IsNull(cbo_Status) Then
Whereclause = "Forms![frm_Audit]![Status].Form![Status] = '" & cbo_Status & "'"
End If
When I run this code, I message box...
I am using the following code to open a form (frm_Audit) that contains a subform (frm_AuditDetails) from another form, frm_Search. This is the code in the On CLick event of a combo box in frm_Search.
Dim stDocName As String
Dim Whereclause As String
stDocName = "frm_Audit"...
I have two tables:
tbl_Audit
AuditID <PK>
Auditor Name
etc
tbl_AuditDetails
DetailsID <PK>
AuditID <FK>
I have a form, frm_Audit, that is used to enter general info into tbl_Audit. This form also contains a subform, frm_AuditDetails, and this is used to enter the specifics of an audit. The...
I have a form, frm_Metrix, for viewing the number of audit items performed during an audit. The record source of this form is tbl_Audit which has:
tbl_Audit
AuditID <key>
Item No <Number>
I have another form, frm_Audit, that is used to enter all the audit items into tbl_Audit.
In...
I have an unusual problem with one of my forms. I designed a form for entering maintenance records of instruments. One of the fields is for attachments and its property is set to OLE Object. I named this field txt_attachment and placed it at the bottom of the form, after several other text...
I have a form, frm_Metrix, that I use to tract the number of Reports generated per month. The RecordSource of the form is the query qry_Metrix. Here is the sequel for that.
SELECT Count(*) AS NoOfReport, Year([Date Initiated]) AS [Year Initiated], Month([Date Initiated]) AS [Month Initiated]...
I am getting this error message when I run the code "Microsoft can't find the field "I" referred to in your expression." and highlights the OutlookTask.Subject line. Please help.
Dim rst As DAO.Recordset, db As Database
Dim OutlookApp As New Outlook.Application, OutlookTask As Outlook.TaskItem...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.