Recent content by gbil

  1. G

    How to go from Intermediate to Advanced - please help

    If I may, I think I need to learn these things.
  2. G

    Distribute field value into a listbox in 2 or 3 columns

    Hello. i want to display a single field values in list box with query as row source. the query will produce variable number of records or rows. sometime 1, sometimes 3 or 6 my thought is to distribute these records/row into list box column. for example: if query = 1 then listbox column = 1...
  3. G

    recordset.sort not working?

    Ooops. i need to delete recordset.sort? :o lol. i already sorted the query. thanks.
  4. G

    recordset.sort not working?

    you are right. the code now execute as it should be. :D and i clean up the query as you suggested. can u suggest what i need to improve to make the code more efficient? even though it will only process some 50 records, i really want to improve my coding (even though i am also the one who...
  5. G

    recordset.sort not working?

    Hmmn... the query as is, is running ok So recordset.sort is bugged. Thanks.
  6. G

    recordset.sort not working?

    rst2.sort is also not working. here is my sql: strSQL = "SELECT qryMembers.tPrimaryCrop, Count(qryMembers.tPrimaryCrop) AS CountOftPrimaryCrop" strSQL = strSQL & " FROM qryMembers" strSQL = strSQL & " GROUP BY qryMembers.tPrimaryCrop, qryMembers.tOrgCode" strSQL = strSQL & "...
  7. G

    recordset.sort not working?

    hello. i am trying to sort a recordset but it is not working: Set rst = db.OpenRecordset(strSQL) rst.Sort = "CountOftPrimaryCrop Ascending" 'ASC has same effect rst.MoveFirst Do Until rst.EOF Debug.Print rst.Fields("CountOftPrimaryCrop") rst.MoveNext immediate...
  8. G

    Extract data from query

    got it! :D Set db = CurrentDb 'strSQL = "Select (COUNT(qryMembers.tGender))" 'strSQL = strSQL & " AS [MaleCount]" 'strSQL = strSQL & " FROM qryMembers " 'strSQL = strSQL * " WHERE qryMembers.[tGender] = 'Male' AND qryMembers.[tOrgCode] = '" & strVariable & " ' ;" 'the above...
  9. G

    Extract data from query

    ok. thank u for your attention. i guess i have to do it a long way until i found something to make it more dynamic.
  10. G

    Extract data from query

    Hello. i am trying to extract data from a query but access help is confusing (sorry, my fault). part of code when form loads, my questions is bold: 'query criteria vOrgCode = Me.tOrgCode 'sql statement strSQL = "Select tblMembers.tOrgCode, tblMembers.tGender...
  11. G

    How do I create an autonumber field

    i think u can find this useful: http://www.access-programmers.co.uk/forums/showthread.php?t=252887
  12. G

    How do i know when a control has focus?

    Chrafangau: thank you. using the me.activecontrol.name in immediate window, i realized my concept on object events is screwed. again thank u.
  13. G

    How do i know when a control has focus?

    hello. in the following code, i am trying to determine if command button has the focus: Private Sub lstOrg_LostFocus() If Me.cmdEditOrgProfile_GotFocus() Then Exit Sub Else Me.cmdEditOrgProfile.Enabled = False End If End Sub the second line returns error...
  14. G

    If End If Construct

    oh i did not know that. thank you Galaxiom. the code now terminates properly. :)
  15. G

    If End If Construct

    Hello. i have this code: Private Sub cboOrgNick_LostFocus() 'making auto-populate textbox with incremental numbering 'if combo box is not empty If Me!cboOrgNick = "" Or Me!cboOrgNick = Null Then Exit Sub 'do nothing or Else 'get new number...
Top Bottom