You could do something like this:
Set f = Application.FileDialog(3)
f.AllowMultiSelect = False
If f.Show Then
For i = 1 To f.SelectedItems.Count
sfile = f.SelectedItems(i)
Next
End If
If sfile <> "" Then
'Run code if a file has been selcted
sfile =...
So basically you open Excel as an object and assign it to the actual Excel file which 'locks' it in but you never release it. You could try to release it by adding these lines:
Set Wbk = Nothing
Set xlsApp = Nothing
I do question again though what you plan to do with the file once...
Hi, the only way I can see this working is to remove all the hard-written filters in the query and then dynamically create the rowsource for the list box. So, you would still use my idea to split the string and then use that to build a where statement.
I don't know if this would work smoothly...
Sorry, I hadn't actually looked at the dynamic search demo you have based yours on so my solution may not help. Leave it with me and I will download the demo and then get back to you.
You could use the split function and then put the contents into an array. As long as you use a pre-determined character to define when there is a split then you should be fine. Something like this should work:
Dim strArray() As String, strSplit As String, intCount As Integer
strArray...
You mean you are dbl-clicking the file to open it and it doesn't open?
If so then try opening Access first and then going to File open and see if that works.
Also you could try creating a shortcut which has a direct reference to Access.
Check the filepath in the shortcut. Some shortcuts link to the version of Access as well as the database and the installation folder may be different on 8 to XP.
Try something like this:
wordApp1.ExportAsFixedFormat YOURPath, wdExportFormatPDF, True, wdExportOptimizeForPrint, wdExportAllDocument
NB: YOURPATH should be the full path od the pdf e.g. c:\mypdf.pdf
You say that the code is on the OnClick event and then you click a field in the subform. Can you confirm that the OnCLick event is on the control and not the form. Also that the control you are clicking is within the Detail section of the form and the control me.txtOrder is also within the...
Try this:
DoCmd.OpenForm "frmOrders", acNormal, , "OrderID=" & Me!Order, acFormEdit, , "Edit"
I assume 'Order' is the control name with the value you want to filter to.
Looking at the code I think it should do as required unless the function is not retuning the correct value and the cancel never gets triggered.
Have you stepped through the code to see what is happening?
I've done a fair bit of work with clients on Citrix but have always kept the FE and BE on a network drive. There have been occasions when Citrix would have a blip and the drive with the database on would briefly disappear resulting in a frozen database but logging out and back in always fixed...
It sounds like what you've done is right but maybe locking/hiding certain fields or adding labels could clear things up. You can set the screen as required depending on the parent by using the OnOpen Event of the form.