Search results

  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...
  16. F

    Filter all DB records by one combo selection on DB entry

    JANR - I'll try a few more troubleshooting suggestions if any has any before I try to upload a sample. I'm not sure I will be able to easily cut it down and keep it operational. It's 10MB at present, (for the FE) and BE. Wikilendt I have taken your suggestion. I edited the start form so that...
  17. F

    Filter all DB records by one combo selection on DB entry

    I have tried numerous variations in code, none of which work. I did manage to finally get the code to resolve the numerical reference for the combo box to the text value. I can see when the code debugs that it shows the business name for each. However it doesn't actually filter when the form...
  18. F

    Filter all DB records by one combo selection on DB entry

    I have tried many different combinations but I'm not really getting anywhere. I think part of the problem is that the field that need filtered on the main form (frmJSA) seems to be resolving numerically in the code, but displaying as text on the form. I'm trying to match text but that clearly...
  19. F

    Filter all DB records by one combo selection on DB entry

    Hi, I have been following up on this now I am back in the office. I have made some progress but it's not quite working yet. I get the data type mismatch error when the filter tries to apply and I don't understand why. 'frmStartFilter' is the startup form with the unbound combo to select...
  20. F

    Form requery is refusing to cooperate! Help

    I didn't realise this thread was still going. However, thanks for the extra code pointers and links. Always highly appreciated from you guys. I'd still be staring at crappy access template if it wasn't for helpful people on this forum. Thanks
Back
Top Bottom