Recent content by fraser_lindsay

  1. F

    Use 'enter' key to confirm combo box selection

    Thanks for your help - I will give both methods a try.
  2. F

    Use 'enter' key to confirm combo box selection

    Hi, I have a simple form. It has an unbound combo box. I use the selection in the combo box and the after update event to filter my database records, by business. When the form first loads it sets a default value and set focus to that combo control. I want to be able to just press 'enter'...
  3. F

    Select specific number of records and randomise

    David, Thanks for the pointers, once again. I am making some progress (I think). I have created a function called 'RandomMCQQuestions': Public Function RandomMCQQuestions(nIndex As Integer) As String Dim strItems As String For n = 1 To nIndex strItems = strItems & "," & "Random number...
  4. F

    Help with my 'if' statement - not resolving correctly

    I see what you mean, thanks.
  5. F

    Help with my 'if' statement - not resolving correctly

    Amazing. I woudl never have got that in a million years. Changed it to: If CDbl(Me.txtMCQnumber.Value) < CDbl(Me.txtTotalMCQ.Value) Then and it worked perfectly. I'm not quite sure I understand why though? Is it because it forces a detection of actual numbers in the text box and not just...
  6. F

    Help with my 'if' statement - not resolving correctly

    Help! I have some code which runs in the after update of an unbound text box. The user enters a number of questions required which is compared to the total number on the record set, also from a unbound combo on the form. The code works (kind of) but for some reason the 'IF' part isn't working...
  7. F

    Select specific number of records and randomise

    Hi, I have a fairly basic database of exam questions I have put together. I have a form bound to a query with all questions. On that form I have a text box for the user to enter the number of questions they want. I generate the exam paper based on a combo selection, some options and...
  8. F

    Memo field text formatting

    I'm guessing the lack of response means - "No, you can't do that, bother somebody else".
  9. F

    Close all forms - except one!

    Fantastic, got there in the end. Thanks for your help. I thought I was close but as ever my basic coding skills were too basic. I never get the syntax correct. This works: Private Sub cmdHome_Click() 'This code closes all open forms in the current project and then opens the named form in...
  10. F

    Close all forms - except one!

    Ok, the code runs but no no forms close. I press CRTL + G and I go to the code window. There's a list of objects in the 'immediate' box at the bottom. The form I don't want closed is called "StartFilter". It's in the quotations but it doesn't work. Is there perhaps more code to define NOT...
  11. F

    Close all forms - except one!

    Do you mean like this: Private Sub cmdHome_Click() 'This code closes all open forms in the current project and then opens the named form in quotations Dim obj As Object Dim strName As String For Each obj In Application.CurrentProject.AllForms If obj.Name <> Forms![StartFilter] Then Else...
  12. F

    Close all forms - except one!

    Hi, I have been using this code to close all open forms when loading another form. I launch it form a command button and it keeps things tidy. However, now I would like to exclude one form - I want to keep one form open, but hidden, no matter what. How do I write that into the code? 'This...
  13. F

    Filter all DB records by one combo selection on DB entry

    Wiklendt, You are my hero! Seriously, that's sorted it. I already had the combo box set as two columns with the ID hidden. What I also did was add the table 'Business' to my query which was the record source for the form, added 'BusinessID' to the query and then to the form, made it invisible...
  14. F

    Memo field text formatting

    Just to clarify - I know I can set the font and size etc in the propoerties window, I have done that. However when pasting in text the field takes whatever format the pasted text has and I want it to take the default. I know this can be achieved through paste special, but a lot of users don't...
  15. F

    Memo field text formatting

    Hi, Can anyone tell me if it is possible to force a memo field (rich text format) to use a specific font and font size by code? I'd like to ensure that whatever text goes in either by typing but crucially by edit - paste, goes in in the same format. It would help me out a lot. I'm using...
Back
Top Bottom