Thanks Duane. I understand what you're suggesting to do but I'm unable to write the code in vba on a button to update the SQL property of a saved query with "mySearch". How do I do that? I am able to write the code to export the saved query to Excel as shown below. Thanks again.
Dim...
...this? The following is the code used on buttons in the main form for filtering. Thank you in advance.
Dim mySearch As String
mySearch = "Select * from asqAddressAll where 1=1 "
If Not IsNull(Me.cboxStreetFilter) Then
mySearch = mySearch & " and [Street Name] = '" & Me.cboxStreetFilter...
Hello, I am bringing to top the window of an external program (Microsoft Outlook) with the following code:
Private Declare Function BringWindowToTop Lib "user32" _
(ByVal hwnd As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _...
Hello. I am able to open Internet Explorer and Outlook with the following code on a button on my form;
Dim X As Variant
Dim Y As Variant
Dim Path1 As String
Dim Path2 As String
Path1 = "C:\Program Files\Internet Explorer\iexplore.exe"
Path2 = "C:\Program Files (x86)\Microsoft...
...not come up if nothing is in the from/to fields. My code is as follows:
Private Sub Filter_Click()
Dim mySearch As String
mySearch = "Select * from asqHouseAll where 1=1 "
If Not IsNull(Me.cboxHouseStatusFilter) Then
mySearch = mySearch & " and [House- Status] = '" &...
...combo boxes. This is the code I have so far which is not working due to the last If Not statement:
Dim mySearch As String
mySearch = "Select * from qMarconL where 1=1 "
If Not IsNull(me.combo1) Then
mySearch = mySearch & " and City = '" & Me.Combo1 & "' "
End If
If Not...
...As String
If Not IsNull(Me.cboxHouseStatusFilter) And Not IsNull(cboxTownFilter) And Not IsNull(cboxBuilderFilter) Then
mySearch = "Select * from asqHouseAll where (([House- Status] = '" & Me.cboxHouseStatusFilter & "') AND (Town = '" & Me.cboxTownFilter & "') AND (Builder = '" &...
...in the header portion of the form. My code on the button is as follows:
Private Sub Command17_Click()
Dim mySearch As String
mySearch = "Select * from qMarconL where (([City] = '" & Me.Combo1 & "') AND ([LastName] = '" & Me.Combo2 & "')) "
Me.qMarconLsubform.Form.RecordSource = mySearch...
Thanks AceMan, that's just what I did with Calculator. The Calculator does come up to top when it is behind Access. However, when Calculator has first been minimized, it only flashes on the taskbar and does not come to top. Is there a way to have it come to top after it has been minimized to...
Thanks AceMan. I'm trying to implement your code but am having problems. Access isn't accepting the WindowTitle. The title bar of the window literally reads; Chief Architect Premier X5 - [Hamilton Comps1: Floor Plan]. I've tried underlines, single and double quotes, etc. Can you tell me...
I have 4 buttons on a form, each of which open a different file in a single external application. When I click the button to open File 1, the external application and file open on top as desired. After doing some work on that file, I minimize the external application and return to my Access...
Hi,
I am opening IE and Outlook from a button on a form with the following code:
Private Sub OpenIEandOutlook_Click()
Dim x As Variant
Dim y As Variant
Dim Path1 As String
Dim Path2 As String
Path1 = "C:\Program Files\Internet Explorer\iexplore.exe"
Path2 =...
Thanks Skip. I have tried your suggestion and I have 2 problems. First, each line of data imported goes into one cell which makes it 'unsortable'. For example, width and depth go into a single cell, so I am unable to sort by width. Secondly, I go for the data on a daily basis so I am trying...
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.