Search results

  1. Garcimat

    Calling variables on SQL

    I need to check if the work section X to Y is not been used by another work group, if it is free I issue a Work Permit.... I can not have overlapping ( two groups working in the same work section)
  2. Garcimat

    Calling variables on SQL

    Actually it is not working, it is not getting the second "AND"
  3. Garcimat

    Calling variables on SQL

    hey @CJ_London , this is a query that @arnelgp helped me with, but I am doing some modifications... it is working now but is there a better way to write this ? Looks weird and too long.... having two "AND". strSQL = "SELECT * FROM tblData WHERE Section ='" & Me.cmbSection & "' AND " & "((" & X...
  4. Garcimat

    Calling variables on SQL

    I need to stop and learn all this concatenation.... Thank you
  5. Garcimat

    Calling variables on SQL

    Hi guys how do I call a variable inside a sql query ? I can do it on the sql server but no with access. I want to use the value from a combo box as filter, actually several combos :) Dim sql As String Dim varCMB As Variant ' value from the combo box varCMB = Me.cmbSection sql = "SELECT* FROM...
  6. Garcimat

    Visualize SQL Query Result

    @arnelgp I am trying add more conditions on that query for overlapping that you helped me with.... :giggle:
  7. Garcimat

    Visualize SQL Query Result

    Thank You it will be very useful
  8. Garcimat

    Visualize SQL Query Result

    All credits to this guy.... Access - Visualize Query Results from VBA - Bing video Found it... ------------ Module Public Sub ShowdataSheet(ByVal sql As String) Const Query_Name As String = "qry_dummy_display" Dim db As DAO.Database Dim qd As DAO.QueryDef DropQuery Query_Name Set db =...
  9. Garcimat

    Visualize SQL Query Result

    Hi Guys Is there a way to see the result of a SQL query on access like we have on the SQL Server ? for example I have this query Dim sql As String sql = "SELECT * FROM tblOrder Where OrderStatus = ""In Progress""" And I would like to see the result so I can make changes, sorry if it sounded...
  10. Garcimat

    ListBox x Subform DoubleClick()

    Now it is a matter of honour, I will get this to work !
  11. Garcimat

    ListBox x Subform DoubleClick()

    Thanks, I will print it.... make understanding easy when everyone is speaking the same "language"
  12. Garcimat

    ListBox x Subform DoubleClick()

    Everything looks fine BUT.... doesn't work hahaha gvar_index is a global variable on a module do I have to declare again ? frm_ActivePTFs2 Private Sub txtRecordId_DblClick(Cancel As Integer) MsgBox "test" ' it is working ! gvar_index = Me.txtRecordID MsgBox gvar_index ' it is...
  13. Garcimat

    ListBox x Subform DoubleClick()

    I thought about that yesterday, but I don't know how to get the index from that record and open the editing form.
  14. Garcimat

    ListBox x Subform DoubleClick()

    It is not working ..... Why do I get this msg ?
  15. Garcimat

    ListBox x Subform DoubleClick()

    Thanks, very interesting... I try it in a test database, I really need the conditional formatting and the ability to call an specific record on a editing form.
  16. Garcimat

    ListBox x Subform DoubleClick()

    If the issue is with a subform, why do you post code for a listbox? That is the code for my List box, I am trying to double click on the subform and open another form with that current record in the same way it was doing with the list box. Why do you open query? That is the way I found to get...
  17. Garcimat

    Range Variable is it possible ?

    Thanks for your help.... yes the tracks can have same limits ( 4km to 5km) in case of a Station or Level Crossing only with one permit... and it can be totally different... (4km to 5km on the Down track for one work group, lets say doing maintenance on the stations lights with permit number 01...
  18. Garcimat

    ListBox x Subform DoubleClick()

    Hi guys I have a list box on my form with data from a query, in the double click event it would collect the data from the record clicked, send it to another query and then open a form with that specific record. I want to change the format (as an visual alarm) when that record expire, not...
  19. Garcimat

    Range Variable is it possible ?

    I am trying to insert in the sql query a criteria to filter the "Section" and the "Direction", I can have more than one section under works and there is a possibility to give a permit for example from Km10 - Km15 on the up track and another from Km14 to 20 on the down track..... I am doing a SQL...
  20. Garcimat

    Range Variable is it possible ?

    I have made some changings to the code and it is working.... Private Sub btnValidate_Click() Dim HasOverlap As Boolean Dim X As Variant, Y As Variant Dim strMsg As String ' initial return of the function HasOverlap = True X = Me.cmbKP1 Y = Me.cmbKp2 ' start and end of...
Top Bottom