Search results

  1. insanity

    Filter on 2 Boolean feilds

    Yippie!! Yes that did work ... THANK YOU!!! I also discovered another way as well. You can filter boolean on all .. by the following: WHERE Extracted Like "*" So when I set the string I can either: strExtracted = "= TRUE" or strExtracted = "LIKE " & Chr$(34) & "*" & Chr$(34) Extending on...
  2. insanity

    Filter on 2 Boolean feilds

    Now you've confused me! I sorta do that now on another form which loads a query, but in the criteria field I just enter <=[forms]![frmJournalView]![cboPrevPeriod] and it filters on that combo box. Why do I need to create that public function?? Also why do I want the query to refer to the form...
  3. insanity

    Filter on 2 Boolean feilds

    My apologies, I always thought a dynamic query isone built from code. Learn something new everyday! A query on your solution (no pun intended), does that mean I'd need to make 6 pre-built queries to load depending on the different solutions to the checkboxes? Also the recordset needs to be...
  4. insanity

    Filter on 2 Boolean feilds

    Hi experts! I'm a bit stumped on this one. I am dynamically building a SQL string to load a forms recordset. I've set up 4 checkboxes which filter the data on two fields (set Yes/No). Each field has three options, True/False, False/True, or All Records (Either True/True or False/False) - I've...
  5. insanity

    iff statement needs to place two different remarks.

    Try this: =IIf([PTODESC]="SICK","UNPLANNED",IIf([PTODESC]="VACATION","PLANNED")) You can keep adding more IIf's if need be. Hope it helps. Peter
  6. insanity

    Sort form by combo box

    As it turns out, I was making is much harder than it needed to be. What I did was an INNER JOIN on "tblSchools.Estab" on "tblValidUpload.Estab" to include the header CostCentre instead as Estab wasn't actually needed on this form. Thanks for your help! The last one was the trigger in my head...
  7. insanity

    Sort form by combo box

    I've just realised I didn't explain myself properly. I have the following in the code: Select Case Me.fmeSortBy Case 1 'cost centre & combobox varSortBy = Me.cboEstab.Column(1) Case 2 'period & textbox varSortBy = "Period" Case 3 'year & textbox...
  8. insanity

    Sort form by combo box

    Thanks for the advise. I tried the above, but unfortuately didn't work. It came up with a parameter input box and when I go to the debug screen the SQL becomes: "SELECT * FROM tblValidUpload WHERE Uploaded = False ORDER BY ER560;". ER560 is the value, not the name of the field. This really has...
  9. insanity

    Sort form by combo box

    I have a continuous form with primary key of the table in a combo box. The combo box has three columns and I would like to be able to sort the form based on the data in the 2nd column of the combo box, rather than the Primary Key. I have a Option Group on the footer on the form to enable to...
  10. insanity

    Text file as Body of Outlook

    Got it. I figured out what i'm trying to do, here is the code: Dim f As Integer f = Freefile Open "c:\body.txt" For Input As f Me.txtText = Input(Lof(f), f) Close f
  11. insanity

    Text file as Body of Outlook

    Oh, the reason i'm posting here is it's being run from an Access database and automating an Outlook email. Thanks for link, however the help file doesn't go into this detail. What i'm trying to acheive is a standard email is going to be sent to our stakeholders upon a trigger (i.e. failure to...
  12. insanity

    Text file as Body of Outlook

    I'm having a dumb brain day and require some assistance please: I have a Word document which I want to use as the body of an automated email (using Outlook.Application method not SendMessage) but for the life me I can't figure out how to use this? I want minimal user input. The contact is from...
  13. insanity

    Incrementing a number by 1

    There is a great document available from Access Archon (http://www.helenfeddema.com/access.htm) relating to Records numbers and autonumbers, look for No. 49. I learnt most of my VBA from that site! Good luck Peter
  14. insanity

    forms_subforms

    I've benefited from this ... thanks very much .. But now i've got another question, my form is slightly different in the way that I have a main form (frmServiceCharges) with 3 nested subforms (1. fsubServiceChargesList, 2. fsubServiceChargesEntry, 3. fsubServChargeSLA) The way I *had* it set...
Top Bottom