Search results

  1. P

    Solved SQL/Recordset/Email

    Now it is giving me the previous result, which is only one records when there should be more. I want the rs!State and rs!DateExpires, only, to enumerate under "State" and "Expiration Date". So it will look like this State Registration Alabama 12/31/2020 DC...
  2. P

    Solved SQL/Recordset/Email

    It is not giving me an error. When I click on the cmd, it's just stuck and I have to do a ctrl+Alt+delete and reopen Access
  3. P

    Solved SQL/Recordset/Email

    Hello Guys, I am trying to create a email with the body showing all of the person's information. I think I made a mess because not Access is stuck. Here is the code. Private Sub cmdEmail_Click() Dim db As DAO.Database Dim rs As DAO.Recordset Dim sqlStr As String Dim oApp As New...
  4. P

    Solved VBA Date issue

    I get the correct year. I got it! It worked by using the DateDiff(). It worked with this code Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) Dim curYear As Integer Dim lastYear As Integer 'curYear = DatePart("yyyy", Me.Expires) curYear = DateDiff("yyyy", Date, Me.Expires)...
  5. P

    Solved VBA Date issue

    Earlier I did yes. I had Private Sub Detail_Click() Dim curYear As Date Dim lastYear As Date curYear = Year(Me.Expires) lastYear = curYear - 1 If curYear Then Me.Expires.ForeColor = vbRed End If End Sub that did not work either
  6. P

    Solved VBA Date issue

    Hello Guys, I always have some issues with my date functions. I am trying to get a field to turn red if the date is within 2019 but it is not working. what am I doing wrong? and what if I want it to turn blue if we are in the current year? Here is my code Private Sub Detail_Click() Dim curYear...
  7. P

    Run-time error 3021

    Hello Guys, The following code worked in another form and returns a string but I am getting run-time error 3021 from my code. When I step through it sqlDateEarned shows a value but the value is not transmitting to strDateEarned so I am getting the error message. Can you please help me. (It is...
  8. P

    Solved DateDiff()

    And yes the Select Case is even better. Thank you very much
  9. P

    Solved DateDiff()

    Yes stepping through really did help see what I was getting and I also switched the date as you've suggested and it worked better. Thank you so much
  10. P

    Solved DateDiff()

    Hi Guys, I am trying to use the DateDiff() in a VBA code which will change text colors base on the result. My issue is I am a little confused as how to I say: If date is between 30 and 60 days late (so -30 and -60 right?) make it red If date is 30 days then make it blue but if it is in the...
  11. P

    Solved #Name? Error

    Thank you for the information. I did know this about the Control Source property.
  12. P

    Solved #Name? Error

    Thank you Guys. The DLookup worked!
  13. P

    Solved #Name? Error

    Hello Guys, I am trying to retrieve a value through a SQL statement and place it into an unbound text-field. When I run the program, the immediate window shows me the correct information but the text-field shows (#Name?) What could be the problem? Here is my code Private Sub cmdViewLogin_Click()...
  14. P

    Queries - SQL

    I found that it will work if I specify 2 sets of fields to be equal and not one, which is weird. I am working on it with all of your suggestions. Thank you
  15. P

    Queries - SQL

    No, the result set is over 2000 records which is not right
  16. P

    Queries - SQL

    Hello All, I am trying to create a query with 2 queries by writing my own SQL but it not giving me the correct return set. The RS should be record where 2 fields math but 2 others do not. Here is my code: SELECT [Qry_EngineerLic-PE].EmpID, [Qry_EngineerLic-PE].FName...
  17. P

    Solved Run-Time Error '490'

    Thank you :)
  18. P

    Solved Run-Time Error '490'

    Yes that did it. Thank you so much!!
  19. P

    Solved Run-Time Error '490'

    The folder I am trying to open is within the same folder as the DB, yes. So, they are both under ..\RMF Photos
  20. P

    Solved Run-Time Error '490'

    No I don't know how to do that. Can you give me some guidance, please? Thank you for the help
Back
Top Bottom