Recent content by Hodges

  1. H

    Help with Query for a Chart

    Ok I've done the queries and managed to get a single query with the 3 results I want by first putting these 3 select statements as individual queries: SELECT Count(*) AS Age1 FROM tblMemReg WHERE ((Round(DateDiff("d",[DOB],Now())/365.25))<16); SELECT Count(*) AS Age2 FROM tblMemReg WHERE...
  2. H

    Help with Query for a Chart

    Hey, I have a table with a date of birth field and I need to produce a pie chart showing age groups from this. The groups should be: < 16 > 15 < 18 > 17 Help me!
  3. H

    Select Rows in Listbox

    :D :D :D :D :D works a treat, thank you so much! :D :D :D :D :D
  4. H

    Select Rows in Listbox

    Ok this is what I've got so far: Private Sub Command39_Click() Dim lst As ListBox Dim i As Integer Dim rstPeriod As DAO.Recordset Dim strSQL As String Dim db As Database Set lst = Me!lstStaff Set db = CurrentDb() strSQL = "SELECT StaffID FROM...
  5. H

    Calendar form

    Here is a mini calendar (form + VB) for date inputs (very cute): http://allenbrowne.com/ser-51.html
  6. H

    Select Rows in Listbox

    Ok I've got this so far but I'm struggling to get it working, there's still something wrong...(I believe all object references are correct) Private Sub Form_Open() Dim lst As ListBox Dim i As Integer Dim conDatabase As ADODB.Connection Dim strSQL As String Set conDatabase =...
  7. H

    Select Rows in Listbox

    bump? - sorry I'm desparate :(
  8. H

    Select Rows in Listbox

    Heya, I've got a listbox set to simple multi-select that I want to select rows on form-load based on values in a table (tblStaffBooking). The table (tblStaffBooking) has BookingID and StaffID. The listbox's rowsource is this statement: SELECT [FirstName], [LastName], [ID] FROM tblStaff WHERE...
Back
Top Bottom