Why did you changed all the parameters of that function ?
And why did you change the string into a long ?
Is your query "qryForRanking" a number ? Maybe that is your main problem why it doesn't work.
You can do this in access. What you need to do is open the file from Access :
Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
Dim filepath As String
Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True
filepath = "C:\...\YourDoc.docx"
Set...
Since you are 'beginner/intermediate' I guess you tried something already ?
If that is the case maybe you can show us the code and we can help you fix that.
are the choices in a list or just buttons ?
Do you see the signature when you display the empty email ?
You must enable the default signature in Outlook first.
(See : http://stackoverflow.com/questions/8994116/how-to-add-default-signature-in-outlook)
You cannot mix block syntax and one line syntax :
https://msdn.microsoft.com/en-us/library/office/gg251599.aspx
When the there are more than one line between the if else it is best to fully use the blocks
Well what you tell here : "But sometimes we get codes from the company that are without "/" e.g CW21904 so in that case the table field will store CW21904 but when the form is loaded then it gives me AK280416/1 in the DocCode "
is correct when I look your code.
if there is no "/" : j = 1
Then...
My query should add all the qty for one product and put the highest one on top.
But i agree with JHB. Maybe you can use 2 querys because it is possible that the biggest spender is on the first result but you get on the second result the highest qty.
I made a small change so that the order doesn't matter :
Dim ctl As Control
Dim i As Integer
Dim sControlName As String
sControlName = "Saterday"
i = 1
For Each ctl In Me.Controls
If ctl.Name = sControlName & CStr(i) Then
Debug.Print ctl.Value
i = i + 1
End If
Next...
You can do something like this :
Dim ctl As Control
Dim i as Integer
Dim sControlName as String
sControlName = "Saterday"
i = 1
For Each ctl in Me.Controls
If ctl.Name = sControlName & Cstr(i) Then
debug.print ctl.Value
End If
i = i + 1
Next
The code will loop over all the...
You can do this by changing the recourd source of the subform subfrmPMTasks into something like this :
select PMTasks.*,Max(PMTaskDetails.CompletionDate) from PMTasks join PMTaskDetails on PMTasks.TasksID = PMTaskDetails.TaskID
That way you can mix fields from different tables in one form...
Try something like this :
SELECT Sum(Tabel1.SalesPrice) AS SomVanSalesPrice, Tabel1.ProductCode, Tabel1.Customer, Tabel1.Qty
FROM Tabel1
GROUP BY Tabel1.ProductCode, Tabel1.Customer, Tabel1.Qty
Order by Tabel1.Qty DESC,Sum(Tabel1.SalesPrice) DESC
Have you tried to right click the attachment and save it somewhere on your computer ?
Maybe the security in office blocks email files.
Also if the Global declaration worked for you i guess you did something like this :
sub formA ()
Dim strxlfile3 as string
end sub
then you did something like...
If you create a variable in form A try to use it in form B it only works if it is a global variable (defined in a module) http://www.blueclaw-db.com/access_database_global_variable.htm
It is not the case right now.
So my question is how to you initialize the strxlsfile3 in form B ?
Maybe you should ask yourself this :
So I dont know why you added the quotes in the first place, but any text that is between double quotes is just a plain text for Access.
You can try this :
strsql = "select HeadingID from lkupHeadings where NOT EXISTS (select HeadingID from lkupobjectives where lkupobjectives.HeadingID = lkupHeadings.HeadingID [StaffNumber]='" & Environ("Username") & "'"
Or NOT IN or just a plain old left join.
In any case, Access doesn't...