Recent content by Jeff Bailey

  1. J

    Loops

    It would be very similar ... use the form's recordsetclone as your recordset: Set rsEmail = Me.RecordsetClone or Set rsEmail = Forms!FormName.RecordsetClone rsEmail.movefirst do until rsEmail.eof 'email stuff here loop you wouldn't need to check for SEND = true if you've already filtered...
  2. J

    importing excel file from MS Access

    Mike I had this exact same problem a while ago - and it drove me nuts until I asked in a newsgroup and a wonderful lady named Martha sent me this (which fixed the problem completely): "Sounds like your DAO library got un-registered somehow. (Office 97 installation doesn't register it properly...
  3. J

    Rounding Error

    No, it's not a bug. The convention for rounding that MS uses is sometimes called 'rounding to the even number' and is a bit more sophisticated than just always rounding up. 7.5 gets rounded to 8 but 6.5 gets rounded to 6 This is an attempt to smooth out the error that creeps in when you round...
  4. J

    Loops

    Ignoring all the email stuff (which is not relevant to the loop problem) here is one approach ... You have: Set rsEmail = CurrentDb.OpenRecordset("tbl") Do While Send = True rsEmail.MoveNext EmailSend.Subject = "Information Systems - Hardware Audit" EmailSend.HTMLBody = "TESTING"...
  5. J

    How can I have a write conflict if i'm the only user of the DB?

    Backup, backup, backup! Work with a copy! Very likely you have some corruption crept in. This occurs most often with memo fields. If this is the case you'll have to recreate the table structure, copy all the rows before the faulty row, copy all the rows after the faulty row, copy as much of...
  6. J

    2 Forms Questions

    This worked for me in testing ... Between IIf(IsNull([forms]![frmTest]![xDate1]),#01/01/1950#,[forms]![frmTest]![xDate1]) And IIf(IsNull([forms]![frmTest]![xDate2]),#31/12/2010#,[forms]![frmTest]![xDate2]) What I have done is chosen 2 arbitrary dates as my start and end dates which I am...
  7. J

    2 Forms Questions

    Hi Q1. One approach would be to 'check' the relevant records and then change the recordsource of the form to be a query that has TRUE as it's criterion for that field. That way you would not see any records that are unchecked. You'd maybe want a way to restore the original recordsource...
  8. J

    help with conditonal expression...please

    You'll need to place a copy of the code in the After Update event procedures for any of the fields that affect the result of the calculation (so that the result is recalculated if you change any of the fields). To get at the event procedure ... Open the form in design view. Open the property...
  9. J

    help with conditonal expression...please

    Looks like a Select Case situation to me ... Dim xDiff as long (or maybe double if decimal values are poss.) xDiff = g-c Select case xDiff Case Is < = 0 h = 0 Case Is > 0 if xDiff < e then h = ((g-c)/100)*d else h = (e/100)*d...
  10. J

    Using check box to make text field enable or unenable

    You'll probably need the code in two places: The On Current event for the form so that you enable/disable your field as you move from one record to another (assuming single forms view). The After Update event for the check box. Jeff
  11. J

    Using check box to make text field enable or unenable

    If MyCheckBox = True then MyControl.Enabled = True Else MyControl.Enabled = False End if You can 'shorten' this MyControl.Enabled = (MyCheckBox = True) since (MyCheckBox = True) evaluates to True or False or even MyControl.Enabled = MyCheckBox The shorter versions are 'cleverer'...
  12. J

    Convert 97 to 2000

    What I would try Make as many copies as you can bear to do. You can NEVER have too much back up! Don't overwrite earlier backups (just in case). Compile your code in A97 (in any module Tools, Compile and Save). If no errors are reported try again to convert. Try Repair. Try JetComp. In...
  13. J

    Help recordset clone & date

    In case anyone is interested ... It turned out that the problem was with the recordsetclone. The reason the search was failing was that the form's Data Entry property had been set to Yes, meaning that there were no rows in the recordsetclone. Very easy to miss that! Jeff
  14. J

    Help recordset clone & date

    Tracy If you import enough stuff to show your problem into a test MDB and email me it I'll have a look to see if I can figure out what's going on ... Jeff jeff@dateline.gg
  15. J

    Help recordset clone & date

    OK Use another criterion to get rs to the relevant row and then look to see what you get if you use a msgbox to show you the 2 dates ... msgbox "rs date is " & rs!TestDate msgbox " Form date is " & Me!txtFromDate Jeff
Back
Top Bottom