Search results

  1. K

    Current Event handling

    What is the correct way to handle Form_Current event? I'm finding it runs many times while I am initialising various controls in my startup Form. The only way I've found to stop it is Me.OnCurrent = "" in Form load. (And later Forms!Form1.OnCurrent = "[Event Procedure]") But this prevents Form...
  2. K

    Reading Label Name Property

    In text Box Properties under Other there is a entry for Label Name. What would be the command to get that name in code ? Once I have that I presume I'll be able to read it's caption ? Thanks for any help.
  3. K

    Listbox Click event

    Can how a listbox is populated effect it's click event? To my surprise clicking in my listbox does NOT select the row clicked, as expected Instead row 1 acquires a dotted line and clicking anywhere else has no effect. Also the list box click event does not fire. I have set Allow Value List Edits...
  4. K

    .Additem problem

    Run into a bit of a snag addressing a Form. My code is in a module and I want to add items to a Listbox. With Form_Form1.Form.List1 .AddItem "1234" With forms("Form1").Form!List1 Most examples use "Me" but that's no good in a module, is it ? Everything I try brings up an error. Can you set...
  5. K

    Problem testing query

    My query calls a function which isn't working (yet). How can I stop it running? I've found I need Cntl-Alt-Del End Task, but is there any other way ?
  6. K

    Writing SQL

    With a Select statement, do you really need TableName.FieldName ? It seems to work with just the field name, but maybe there's a downside to this ?
  7. K

    Cancel event isn't canceling

    I'm using https://www.devhut.net/vba-wia-rotate-an-image/ to rotate a Pictures on my Form with this code Private Sub Detail_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim tempPic As String Dim DegreeShift As Long DoCmd.CancelEvent...
  8. K

    Hide Column in Datasheet

    MSDN tells me Hide columns Click the heading for the column that you want to hide. To select adjacent columns, hold down SHIFT and click additional column headers. Note: You cannot select nonadjacent columns. Select any additional columns and...
  9. K

    Shutter bar

    When the shutter bar is open or closed, the Form (Screen?) shifts right/left. Can I detect this event anyhow to shift some controls on the Form that don't move?
  10. K

    Refreshing Issue

    I wonder if anyone may have a resolution for the refreshing as any row in the subform is clicked? The problem is caused by (or as) the pictures load. Many thanks for any help. Been trying to fix it myself for several weeks, but nothings seems to make any difference. I have tried two computers...
  11. K

    List box behaviour

    I have two Forms each with (what should be) identical listboxes. There are no Form events or code and the listboxes are bound to a table and populated as expected. When I click on the Form2 list box, that row or line is selected, and that happens for any row. But click anywhere on Form 1's list...
  12. K

    LIstbox delimiters

    Was there ever a solution found for including commas and semicolons in a (single column) listbox without them bring taken as a field delimiter? I read that replacing a semicolin with a comma worked - but it didn't for me. Both cutoff the text.
  13. K

    Run Form_Current event

    Set r = Forms.Form1.Datasheet.Form.RecordsetClone r.FindFirst "Prefix ='" & txtGoto.Text & "'" If Not r.NoMatch Then Forms.Form1.Datasheet.Form.Bookmark = r.Bookmark Form_Datasheet.Form.Form_Current End If Set r = Nothing The above moves to selected record in Form Datasheet. But it...
  14. 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...
  15. 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...
  16. 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?
  17. 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.
  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 seem to be stuck in a loop with: This action cannot be completed because the other application is busy. Choose 'Switch To' to activate the busy application and correct the problem. I can only Switch To or Retry neither give me back control. Sub Main() Dim ExcelFile As String Dim objExcel As...
  20. K

    Can't find various things

    If a Form insists on displaying a message (looks like an OK msgbox) and just repeats forever forcing a Cntl-Alt-Del to end task (Access), is there any other way of quitting (without Ending task) ? Please, Where is Hide/Unhide to determine what fields are displayed in a datasheet Form. I have...
Top Bottom