Search results

  1. I

    Update data on subform

    What I've tryed is Private Sub listbox_Click() SQL = "SELECT field FROM table WHERE id =" & listbox.value Forms!FormSubToezicht.RecordSource = SQL End Sub But that gives me error 2450 (Cannot find the form...... ) again.
  2. I

    Update data on subform

    The error is gone now. But the next problem is that the data isn't updated. I think that is because the sql where the data is selected is only in the "Private Sub Form_Open(Cancel As Integer) " and has to be somewhere else, only I don't know where. I tryed to place the sql in the field...
  3. I

    Update data on subform

    I tryed this Forms!FormSubToezicht.Requery but that gives error 2450 Cannot find the form...... and I also tryed this FormSubToezicht.Requery but that gives error 424 Object requierd
  4. I

    Update data on subform

    I have a form with a listbox and a subform. The subform has to be updated when the listbox is clicked. In the subform i have a query on opening the form. SQL = "SELECT field FROM table WHERE id = " & listbox.value Me.Recordsource = SQL. I tryed Forms!FormSubToezicht.repaint in the onclick of...
  5. I

    different color for line in listbox

    I tryed but I didn't find anything there. I did however find an example of a listbox which has different colors in each line. Only the color changes with the line. So line 1=red, lin2=blue etc. Also if you scroll. I don't understand much of how it works but I'm gonna study it and try changing...
  6. I

    disable menu option

    I created a menubar with some option. I was wondering if it is possible to disable (gry out) an option based a on if then formula?
  7. I

    form open?

    Is it possible to check if a form is open? I want to do this to prevent an error on closing forms that aren't open.
  8. I

    different color for line in listbox

    I want to fill a listbox from a Recordset and define the color of the depending on a value from the Recordset. Ik can only find how to change the color for the whole listbox. I'm thinking of something like this: If status = "actual" Then listbox.line1.forcolor = "red" Else...
  9. I

    fill listbox from recordset

    Because I didn't think about it :). Does this answer mean that what I want isn't possible?
  10. I

    fill listbox from recordset

    I want to fill a listbox with results from a recordset. I used to fill it with listbox.rowsource = "SELECT veld FROM tabel". That works fine but now I have to retrieve data from another database. How do I tell the listbox to connect to the other database? I allready have this; Set ws =...
  11. I

    Open Query/SQL

    I want to open a query which is build in VBA. I tryed Docmd.OpenQuery en Docmd.RunSQL but both didn't work. My code: If field1.value = True then SQL = SQL & "field1, " End If If field2.value = True then SQL = SQL & "field2, " End If etc. SQL = Left(SQL, Len(SQL) - 2) SQL = "SELECT "...
  12. I

    Start Word Macro with variable

    If want to start a Word macro from Access. For this I use the code which stands under. Is it possible to give a variable that can be used in the macro? ' Word starten Dim WordApp As Object Set WordApp = CreateObject("Word.Application") WordApp.Visible = True ' macro starten...
  13. I

    record locking

    this: if me.recordlocks = 2 then msgbox "Record is locked, you can't change the data" end if gives a msgbox every time a record is used, but I only want the msgbox when an other user is using the same record at the same time.
  14. I

    record locking

    I did. The "edited record" option is on. But I want to check of a selected record is locked at the moment the user opens it, something like this If record=locked Then msgbox "Record is locked, you can't change the data" End If
  15. I

    record locking

    When a record is locked (because an other user has it open) access block the possibily to enter text. Some users are confused by that. Is it possible when a user opens a record that is locked to give a msgbox that the record is locked?
  16. I

    sellength to end

    This works. ThankS!
  17. I

    sellength to end

    I want to the select the data as if the cursor was over it.
  18. I

    sellength to end

    I want to select text in a textbox from a given position to the end. I found the sellength property but I can only select text from the beginning to the given position. Is it possible to select from a given position to the end?
  19. I

    put cursor on position in textbox VBA

    Is it possible in VBA to put the cursor on a specified position in aan textbox? F.E. I have a textbox with "Ingrid" I want the cursor to be after the "g"
  20. I

    Font/style

    Is it possible to put multiple textstyle in one textbox by VBA. What I want to do is some text bold en some text normal. In ASP/HTML I would do it like this textbox.value = "<B>Tekst</B>" & vbCrLf & "text......."
Back
Top Bottom