Search results

  1. C

    Filtering a query via selection in cbo and if no selection filter as if blank

    When i get rid of the like statement then nothing appears in the subform. I think it is cos the cbo is blank at that point. What i dont know how to do is do a query design to say use cbo ID number selected but if cbo is blank use no ID
  2. C

    Filtering a query via selection in cbo and if no selection filter as if blank

    Hi I have a main form which has a subform. As i choose from combo boxes in main form the subform is filtered to less inputs based on my selection. The criteria i am using in the query design is "Like "*" & [forms]![Frm_genusAdd]![Cbo_Tier1]" Works great most the time, however the combobox...
  3. C

    Windows 11 upgrade altered look of forms

    Hi. I have spent a long time painfully creating a database with "pretty" forms. Recently upgraded to windows 11 and now my subtle check boxes are bright blue. On my windows 10 machine at home they are still grey. Has anyone else encountered this change and is there a workaround? Cheers in...
  4. C

    Invalid Use Of Null caused by leaving textbox blank

    I will look up the correct way of dimming variables. Thanks for flagging it.
  5. C

    Invalid Use Of Null caused by leaving textbox blank

    Thanks for response. So I only get this error when i enter data in textbox and then delete it and tab out. If i just enter textbox and instantly tab out it doesnt cause the null error. Why is that? Surely the textbox is still a null?
  6. C

    Invalid Use Of Null caused by leaving textbox blank

    Hi all. I have a form with 2 textboxes. The first textbox is txt_newtier1 and second is txt_confirmtier1. Basically you enter a new name in first text box and then reenter it in second textbox to ensure inputter has entered it correctly. After inputting the data in the first textbox I run a...
  7. C

    Solved Testing for a blank or null textbox

    Thanks very much for the contributions. Much appreciated and good insight gained.
  8. C

    Solved Testing for a blank or null textbox

    Just found this as an alternative but not sure if second part is really adding anything: If Nz(Me.Txt_ConfirmTier2, "") = "" Or Len(Trim(Me.Txt_ConfirmTier2) & vbNullString) = 0
  9. C

    Solved Testing for a blank or null textbox

    Hi, I am creating mulitple forms with multiple textboxes. At times when i click an update cmd button I like to check all fields are correctly filled in and not left empty. For a textbox I always use the following code: If Nz(Me.Txt_Box1, "") = "" Then Else End IF is this the best way to...
  10. C

    Amend command button colours via public constants and load event of each form

    Perfect. Exactly what needed. Thank you all so much. Until next time i get stuck (knowing me a few hours)
  11. C

    Amend command button colours via public constants and load event of each form

    Doh i was doing so well. Not sure if this should be new thread or not as very related but i have now added the following code to do forecolor as well but it seems to make the box turn black not orange. If this not how you would type to change the forecolor: Dim ctl As Control For Each ctl In...
  12. C

    Amend command button colours via public constants and load event of each form

    Hi DBGuy. This also works a charm. Many thanks
  13. C

    Amend command button colours via public constants and load event of each form

    HI ALl thnaks for the above. Hadn't seen the last few responses before coming up with a solution. THis is what i ended up with. In the class module i have this: Public Const ConRed As Integer = 117 Public Const ConBlue As Integer = 117 Public Const ConGreen As Integer = 117 And then in the...
  14. C

    Amend command button colours via public constants and load event of each form

    Thanks for response. Sadly not wanting already defined constants. Please could you tell me how to do constants from the literal long integer.
  15. C

    Amend command button colours via public constants and load event of each form

    Sorry to be stupid but what do you mean has to be a value not a function. Is the RGB thing not deifning a value?
  16. C

    Amend command button colours via public constants and load event of each form

    I have just read an article stating Visual Basic doesn't allow public constants in a class module. THe article was 2001. Is this still the case as this would explain why i cant do what i am trying to achieve.
  17. C

    Amend command button colours via public constants and load event of each form

    FOrgot to say, error keeping getting is "constant expression required"
  18. C

    Amend command button colours via public constants and load event of each form

    Hi. THanks for your responses. I'm attmepting to look at the first option and then will look at themes. I have amended my code to be this at moment: Dim lngRed As Long lngRed = RGB(255, 0, 0) Dim ctl As Control For Each ctl In Me.Controls If ctl.Tag = "C" Then ctl.BackColor = lngRed...
  19. C

    Amend command button colours via public constants and load event of each form

    Hi. Its been a while!!!!! I have multiple forms in my database. Overtime i may choose to change the color scheme or alternatively just to save me choosing colors for command buttons when building forms i'm looking for a way of setting the command buttons backcolor and forecolor on the load...
  20. C

    Access Database Linked to Excel spreadsheet refreshing too often

    HI Issac. I didnt really want to link if honest. What i really wanted to do was when i click a command button in access it exported my qry data to a already existing worksheet in excel and named that range. Is that possible or not?
Back
Top Bottom