Search results

  1. B

    Iff Statement within A message box within a Parent Message Box

    Hi Minty I am slightly confused what is the value I need to provide? I've tried various variations of the vbYes/Vbno but I in all honesty have no idea what I have not done. Could you put it in laymans terms for me? :( Thanks in advance!! I think my brain might be going to melt slightly
  2. B

    Iff Statement within A message box within a Parent Message Box

    Hi I'm not sure if i am going about this the right way, but basically I want a message box on close to either action another message box with an iff statement or simply to close. This is what I have so far, I haven't toyed with any message box iff statements before so I'm not sure quite how...
  3. B

    Syntax Error in Query

    I've done exactly this prior to posting here and all the parenthesis appear correct I even went so far as to print it and highlight them as they were correct. I wasn't sure if there was something else potentially causing a syntax error which is why I was asking for assistance. Are you able to...
  4. B

    Date Query

    Thanks very much the string worked.. I have no idea when I put the string in (when I wrote it) that it wouldn't work, but it does now and you are a champ! Thanks very much for assisting!!!
  5. B

    Date Query

    eeeek I meant when I try and put the query into a form or the results into a form it doesn't work. That will teach me to try and form sentences in the middle of the night! Anyhow I am not sure if it is the query or the query to field (in the form) which is wrong. I am happy to post the question...
  6. B

    Syntax Error in Query

    I am having an issue getting the query below to run successfully. I have a similar modified query and it runs fine this one however is returning a syntax error and I can't find the error, and it could be a case of staring at it for too long so I've missed it. What I am trying to do is isolate...
  7. B

    Date Query

    Hi Everyone I've recently come up against a date issue in a query and I am wondering if anyone can help me I've tried several different ways and I'm not getting the result I'd hope for. What I am trying to do is cross check all the records and only isolate the most current date for each...
  8. B

    Count Query using a switch function

    Hi Steve The suggestion you gave unfortunately did not work it still tells me I have a syntax error on the from clause. I am unable to upload the database due to the sensitive nature of the contents. But any assist that can be offered is much appreciated. Thanks again
  9. B

    Count Query using a switch function

    Hi I'm having a small issue with the below code and I have noidea what I am doing wrong. It keeps telling me I have a syntax error. Can anyone shed some light on what I am doing wrong.:banghead: I am trying to count the different genders over a selected period of time and I want to change...
  10. B

    Select Date - Change background colour

    Moke123 - You rock! I'm an idiot :P I had the conditions the wrong way around :banghead: Thank you Thank you Thank you for being so patient and helping me out!!!
  11. B

    Select Date - Change background colour

    Alrighty So I'm trying to base an a colour change based on the below variables. One being birthdate and the second if they check a tick box. This is sort of what I started with and Isskint suggested how to clean it up, which was awesome Me.Detail.BackColor = vbWhite 'Default colour If...
  12. B

    Select Date - Change background colour

    Moke123 - Thanks for that - I understand that concept, I'm asking about the date integer specifically, I tried a different way to incorporate the date solution above plus a text box and i can't make it work, its the first time I've ever tried something like this. I would be so grateful if you...
  13. B

    Select Date - Change background colour

    Thanks Moke123 It's starting to make a little more sense. One final question and I'll figure out the rest. Using your solution above/below how do I add multiple conditions based on for example the birth date and whether a secondary condition is met ie a date of birth and a check box on whether...
  14. B

    Runtime 2135 Error

    Hi I''m having an issue when I run a dLookup in a form when the query runs I get a runtime error 2135 advising that the record is read only and can't be set. I've done a bit of research and can't figure it out. The Dlookup I am using is supposed to look at a table Client ID and return a...
  15. B

    Select Date - Change background colour

    Moke123 So I tried the Nz wrap and it works however everything > 18 or NZ changes colour. What is the best way to prevent this? Should I use a default colour or should I add in a if Nz statement? Many thanks for your assistance I feel like I'm feeling in the dark not having done anything like...
  16. B

    Select Date - Change background colour

    Ok I'm no longer lost *cheer* But every so often it returns the null value error again and it appears this is now caused by having no date of birth entered. Is there anyway validate a DOB which is blank and have the code still run ignoring the fact there is no DOB? Almost skip to the risk alert...
  17. B

    Select Date - Change background colour

    Alright I'm still lost It is returning a null value on the highlighted line. I can't see where I have gone wrong (using the solution provided by Isskint and a bit of research). :banghead: this is the last piece in a very frustrating database if anyone can see anything obvious I'd love your...
  18. B

    Select Date - Change background colour

    Hi It is still returning a Null value.. I have no idea what I have missed :| This is the code I have Private Sub Form_Current() Dim intAge As Integer intAge = DateDiff("yyyy", [DOB], Date) 'calculate age in years If DateSerial(Year(Date), Month([DOB]), Day([DOB])) Then intAge = intAge - 1...
  19. B

    Select Date - Change background colour

    Ok So I tried this and it is returning a null value.. Is it just me or have I done something wrong? I even tried If Date < DateSerial(Year([DOB]), Month([DOB]), Day([DOB])) Then incase it was meant to be DOB not date but it is still returning a Null Error for the date part I placed colours...
  20. B

    Select Date - Change background colour

    Hi Thanks for your response, The function for the alert is working (as it was which is awesome) however the date function is not working, Have I missed something in the calculation? I've done the 6570 on number of days before the date to give the cut off.. Is this correct? I have also altered...
Top Bottom