Search results

  1. G

    Sql Code Ranking

    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.
  2. G

    Create table in Word Document From Access using VBA

    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...
  3. G

    log out if user unactive

    Maybe you can follow this : https://bytes.com/topic/access/insights/951897-inactivity-detection-access
  4. G

    Select text to be added to another text field

    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 ?
  5. G

    VBA Signature

    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)
  6. G

    Rank in Querry

    I just pointed that you don't need a new field in your table. That was all :)
  7. G

    Rank in Querry

    If you use the code above, that rank in class is calculated on the fly. No need to save it or add extra code.
  8. G

    Help withExcel VBA code

    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
  9. G

    VBA code to check if there "/" in the Reference

    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...
  10. G

    Close a form if Combobox Text = ""

    Like JHB said : move the DoCmd.Close to a new line... If Isnull(ClientName) Then DoCmd.Close Else .... End If
  11. G

    How to check which product is most popular

    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.
  12. G

    Forms path Advice

    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...
  13. G

    Forms path Advice

    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...
  14. G

    Displaying last date in a text box from another forms subform

    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...
  15. G

    How to check which product is most popular

    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
  16. G

    Looping through numbers to add a value to a field

    I like to name field like that in a way it make sense. In your case i would have picked Is_Unique so i know that it is a yes/no field
  17. G

    CDO attachment

    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...
  18. G

    CDO attachment

    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 ?
  19. G

    Access 2013 IIf #error

    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.
  20. G

    Using Minus operator

    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...
Back
Top Bottom