Search results

  1. K

    Indenting a list box

    I bet this is something you just don't do. My list of items is in groups with a Title. I'd like to indent the non-title rows as per the attached image. The click event is wanted for each row so I have used a listbox but leading spaces are ignored. Would some other control be better? I intend to...
  2. K

    Problem with subForm On Current event

    It took me ages to work out what ran first and why. Source Object property had to exist for SubForm Current event run first. I ended up using the method in arnes sampleform.accdb which bypaseses the current event if a boolean is false lstacomment would just keep populating if it wasn't cleared.
  3. K

    Problem with subForm On Current event

    I think I've figured it out. All depends on SourceObject being set, or not.
  4. K

    Problem with subForm On Current event

    Something is weird. In arne's sampleForm db I put a stop In Form1 Form_Open and a Stop in ds500 Form_Current. I open Form1 and it stops in ds500 Form_Current. But doing the same thing in my db sees it stop in Form1 Form 1 Form_Open. Can anyone explain this ?
  5. K

    Problem with subForm On Current event

    Hey arne, as I get more into this I do see you were right and I understand what your sample shows. However MarkKs idea about Me.SubformControl.SourceObject = "fNameOfFormToLoad" did stop the error I was getting. I'd like to prove this by undoing what I did e.g. Make sure to delete the name of...
  6. K

    Problem with subForm On Current event

    Had never seen a report before arne, and some of the code to set twips and sizing was impressive - if a bit daunting. But knowing such things are possible.... Your design is more concise than mine . Is that the right word? I'm sort of doing more too. MarkK suggestion has worked though and the...
  7. K

    Problem with subForm On Current event

    I don't want to contradict arne but I think it did work. A bit hard to follow stepping through but I had an error trap (sort of what DBGuy suggested) which I've now remmed out and no error anymore. It was Error 2455. arne I was going to try your suggestion next, although couldn't figure out...
  8. K

    Problem with subForm On Current event

    I have some sub Forms on main Form. One has an on current event and this fires before the Main Forms Load event which sets up things the SubForms current event needs. (At least it appears so by stepping through). I can circumvent this with some hacks but wonder how it might be resolved...
  9. K

    Adding text to a Form

    Almost, but looking ahead I think a click event is wanted for each row, so that probably means a listbox. I did get the textbox setup using Forms width & height and that worked out spot on. Also thinking the Form Header showing Haeder text would be advantageous. That's another first here. BTW...
  10. K

    Adding text to a Form

    I seem to remember (but may not have been Access) that you could put text directly onto a Form without needing a textbox? Is this possible? If not, is the text box width & height be set to equal Form Width & Height - and in the Form Load event or in Properties?
  11. K

    .FindFirst

    Really? Ok I aplogise to CJ. I was using what seemed a hack and didn't really like it. tmp = "Title = #" & w & "#" tmp = Replace(tmp, "#", Chr$(34)) .FindFirst tmp
  12. K

    .FindFirst

    I'm not following the replies so well. What difference where the string comes from (and what is "raw value")? From MSDN 'Search for the first matching record rst.FindFirst "[OrgName] LIKE '*parts*'" This will fail if "parts" is "part's". Replacing all single quotes will also fail...
  13. K

    .FindFirst

    Ah, ok. But what about the single quote in e.g. a word like "don't" ?
  14. K

    .FindFirst

    If the criteria for FindFirst contains an apostrophe what is the correct syntax? I have a workaround using Replace but it's messy and I suspect a 'proper' method exists.
  15. K

    Record Count always 100?

    Well that was pretty easy! Kindof weird tho as hasn't it been assigned to another in the previous line?
  16. K

    Record Count always 100?

    Struck a problem with Set GetBBPrefixAndLC = rs The function doesn't return the recordset (as it does with Set GetBBPrefixAndLC = .OpenRecordset) And causes error 3420 Object Invalid or no longer set Any thoughts on that ?
  17. K

    Record Count always 100?

    Thanks arne, that lets me get the correct record count; any idea why my routine returns either 0 or 100 ? Just curious...
  18. K

    Record Count always 100?

    Function MyBBList() As DAO.Database Set MyBBList = DAO.OpenDatabase("\\Win10-pc\Desktop\TestBBTableMay2020 (1222a).mdb", False, False) End Function Function GetBBPrefixAndLC(y, Title) As DAO.Recordset Dim sql As String 'Construct sql With MyBBList.CreateQueryDef(""...
  19. K

    Component request Pending

    I Know I know! Every time it crashes I'm reminded of that ! But I have a text screen capture tool, so sometimes don't lose everything .
  20. K

    Component request Pending

    > If you don't have the function code, how can it return file path? I wasn't saved so was lost after the crash. Since resurrected - Function getExcel() As String Dim CommonDialog1 As Object Set CommonDialog1 = CreateObject("MSComDlg.CommonDialog") CommonDialog1.Filter = "Excel Files...
Back
Top Bottom