Search results

  1. K

    Changing How Form Looks When Filter is Applied

    Hi LQ, i've never used this but there's an OnFilter event for the form, you may be able to do something with code like the below Private Sub Form_ApplyFilter(Cancel As Integer, ApplyType As Integer) If ApplyType = 0 Then 'filter off me.lblName.Visible = False Else...
  2. K

    Null Date Field Question

    Hi Judy, try If Not IsNull(Me![TermDate]) Then ... That should sort it HTH Drew
  3. K

    Message Box to show delete query info.

    Hi CAP, your msgbox looks fine - if you're calling it from within the form you can use me.StartDate and me.EndDate instead, if you're using it in a seperate function then you may want pass the dates as parameters to make it re-usable. FOr Recordcount - this only knows about the last record...
  4. K

    retrieve a value from listbox

    Hi Willem, try http://www.access-programmers.co.uk/ubb/Forum7/HTML/001807.html , it should give you a start, if not post back HTH Drew
  5. K

    Double Calculations Problem

    Hi, I would like to know if there is a better solution to this but mine was to create blnIsCalcd as boolean, turn it to true on the first run thru and test for it, stepping over if it's true, HTH Drew
  6. K

    Determining if value is a number or text

    bah! Could the answer be any less interesting? I really wanted it to involve overflows and bits, nevermind. Back to my boring day job, feeling a little more stupid than before. I really want to delete that post above but i guess i'll leave it :-) thanks axa, it's good to know we can all use...
  7. K

    Determining if value is a number or text

    I'm also v. intrigued by this, why does CDec("34D000") return 34 instead of 3461120. Also IsNumeric("34D0") is true. I'm gonna keep playing and will post if i find anything, thanks Ken - the day just got more interesting. Most interesting puzzle i've ever seen here, i feel the answer is...
  8. K

    Set focus of a text box control on a form

    Hi Reena, You could either move all the code onto the On_Exit event of the control and make use of Cancel=True to stop the focus moving away or you could create a form level variable ( eg blnIdOkay as boolean ) and toggle it once the entry is okay. Then check for it on_exit eg. If not...
  9. K

    Basic programming help

    Hi, i think you just need to lose the .selection from line like Me![Button136].Selection . What you're after testing is the value of the check box rather than anything else. Leaving it as me![Button136] shoule work as it's basicaly a shorthand way of putting Me![Button136].Value HTH Drew
  10. K

    Text String...

    Hi Mike, i'm not sure that this is exactly what you're after but it may be a start Function FindAndReplace(strString As String, strFind As String, strReplacement As String) As String ' replace every instance of strFind within strString with strReplacement Dim x As Integer 'place holder...
  11. K

    VB beginner having problems with a function

    Hi Mark, here's a double space stripping version. I't's getting uglier but it still works so who cares Public Function AddrCheck(sString As String) As String Dim ChkCharArray(3) As String Dim c As Integer Dim z As Integer Dim y As Integer ChkCharArray(0) = Chr(39) ' '...
  12. K

    Text String...

    If i've read the above right then you have a field in your db that contains "%1 is included for %2". If that's the case you'll need to write a string parser to strip %1 and %2 and replace them with the relevant wording. Otherwise they are just part of a string and won't be differentiated in...
  13. K

    VB beginner having problems with a function

    runs fine here - you may have got a part edited version, i should really know better than to edit code on screen here without testing again. If you copy it again you i think you'll be okay, if not post again Drew
  14. K

    VB beginner having problems with a function

    Hi Mark, this is fairly rough and ready so i'll keep looking at it, it seems to work, but as it's a first write i'd be amazed if it does. Nothing ever works completely the first time i do it... Public Function AddrCheck(sString As String) As String Dim ChkCharArray(2) As String Dim c As...
  15. K

    VB beginner having problems with a function

    No problem, i'm sure people here can build you a replacement if required. Have you tried searching the database for Replace? If you move your mouse over it in the code and right click it should give you a "Definition" option down the bottom. If you click it, it should take you to some code...
  16. K

    VB beginner having problems with a function

    hi Mark, can you post the Replace code as well ( i'm assuming this is not a built in 2k function i don't know about? ). Apart from the odd ( and undeclared ) use of z & y, and the complete non-use of X it's difficult to say ( and they aren't going to cause errors anyhow ). There doesn't seem...
  17. K

    ItemData question

    Hi Marko, the code you've used is looping thru all the items in the list box, not just the selected ones. The itemsselected will give you the number as you have correctly, but ItemData refers to all the items in the box, not just the selected ones, which suggests that the first item of your...
  18. K

    Search for TAB and PARAGRAPH BREAK

    Hi RFC, this isn't a complete solution as i've never used VBA in word and don't have 2k, but if you tweak the below a bit you should be able to get what you want; Dim x As Integer For x = 1 To Len(ActiveDocument.Content) x = InStr(x, ActiveDocument.Content, Chr(13))...
  19. K

    Searching for records

    Hi Dale, hope you're ready for this truly half-a**ed solution. This works on 97, if the DoCmd line fails then just use the wizard to make a new "find" command button and substitute the code in. DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70 SendKeys "{TAB}" SendKeys...
  20. K

    multiple selections from string in criteria

    Totaly agree with the above, but i always use double quotes " as it saves any potential problems with things like 'o'mahoney' Drew
Back
Top Bottom