Recent content by Keith Tedbury

  1. K

    No current record error

    Before the code you want to run that uses the record set you just opened you need an if statement that checks to make sure that it has records. To do that use the recordcount property With rs If .RecordCount <> 0 Then .MoveLast .MoveFirst code to run...
  2. K

    time format of txt box

    I don't think Access recognizes nanoseconds, which would cause a problem because it would not recognize the text as a time format which would be why "hh:mm" doesn't work. On this form are you just displaying the time or do you need to be able to enter and edit it as well?
  3. K

    time format of txt box

    I have had a similar problem before on reports and ended up having to format the field in the reports record source so was feed to the textbox in the correct format.
  4. K

    Expression Builder Issues

    IIf([criteria_id] Like "P*",1,0) This would return a 1 for a record where the criteria_id started with P and 0 if it didn't. If you then summed this you would get a count for all the records. The * after the P means it will look for something that starts with but P doesn't matter what is...
  5. K

    Figure out End of year age based on a date

    Sorry your absolutely right. I miss read the question and thought he was looking for the age at the DOS date which is what my code does and not the end of year of for the DOS.
  6. K

    Figure out End of year age based on a date

    Problem with using Datediff is it will only compare the year. So if you had a 12/31/2000 and the 01/01/2001 it would see the the year difference as 1. The code below should give you their age at the DOS date Format([DOS] + 1 - [Birth Date], "yy") Take away the birth date from the DOS and...
  7. K

    Subform query error

    You probably have checked but is default view set as single form in properties
  8. K

    Return Date of Previous Day of Week

    Hi Paul Thanks for pointing that out and giving an explanation. Gone back to look at where I have used the code and saw that I actually use a if statement to check if its a Sunday and if it take away 6 days. Kind of places I have used it is in the default value for date boxes used to filter...
  9. K

    Preventing arrowing back in simple Access 2010 For

    Open the properties for the form On the Format tab set the Navigation Buttons to No which will get rid of the buttons at the bottom of the form that let you move between the records. On the Other tab set Cycle to Current Record. It will just cycle round the fields on the form instead of moving...
  10. K

    Return Date of Previous Day of Week

    Date()-Weekday(Date())+2 date() gives todays date, Weekday(date()) gives the value of the weekday which you take away from the date and 2 is the value for Monday so by adding it you get the date for the last Monday. I would be interested in seeing how other people would do it and if there is a...
  11. K

    form filter

    You could have a query for each form that is uses your current query as its bases and put the criteria in the new query. By using the current query as the base for the new queries they will stay in sync with each other if you make any changes in the future. Or I suppose you could set the filter...
  12. K

    Please help noob here

    What version of access are you using and is it the same version on all the computers?
  13. K

    collecting 2 peices of information from a combo box

    Are you selecting the part from a existing stored list of parts then. If it is information already stored in the database then it would be better to just store the ID field in the other table and use that link to the information when you need it rather then copying all the information across.
  14. K

    How to know emplty recordset

    Its normally a good idea to check the record count before you do anything with the record set to avoid errors. My self I do Set TRANS2 = db.OpenRecordset("SELECT * FROM TRANSACTION WHERE tcode = 't12345'", dbOpenDynaset) If TRANS2.RecordCount<> 0 then TRANS2.MoveFirst End If
  15. K

    Missing Users and Permissions in Database Tools Administer

    I forgot to say that when you add a user they will be added to the user group by default. You will need to add them to any other groups you want them to be part of and this done on the same screen and tab in the group membership section.
Back
Top Bottom