Search results

  1. C

    VBA default combobox value after requery

    Hi, I have this code: If Me.OpenArgs = "frmAddChecklist" Then Set ctlCombo = Forms!frmAddChecklist!cbDEPARTMENT ctlCombo.Requery End if And this code is done after I added new value to table, and now I want that new value to be used as default one, how can this be done...
  2. C

    Changing row color depending on value of a field

    Hi, I have this code that should change backgroundcolor in multiple items form based on a value of a field: Private Sub Form_Current() 'check if field on form called somefield is DVD If Me.TYPE.Value = "DVD" Then Detail.BackColor = vbRed 'DVD Else...
  3. C

    Counting students in age range

    Hi. I have this formula for counting age groups TOTAL 29 - 31: Count(IIf(DateDiff("yyyy";[DATE_OF_BIRTH];Date())>=29<=31;1)) But id does not work, if I use between 29 and 31 also do not work I need to get count (number) of all students that have 29,30 and 31 year of age, any idea where I am...
  4. C

    Counting different students age in same queri from same table

    Hi, I have one table that has fields: [ID] [STUDENT_NAME] [BIRTH_DATE] [GENDER] and I neet to get in qry where students will be counted by age and gender For example: younger then 15 tolal: 20 male: 5 female: 15 15-18 years tolal: 34 male: 12 female: 22 Can this be done in single queri or...
  5. C

    Query grouping from one table

    Hi, I have one table in my access, and out of that I need to show a queri that will show only following resoult in 2 comolms ID (same as original table) SCHOOL_YEAR (all the students that are: 1 year and 1 year (repeat) as 1 year 2 year and 1 year (repeat) as 2 year 3 year and 1 year (repeat)...
  6. C

    VBa filter by date

    Hi, It there is one thing I have in programing it is date conversions... I have this line of code: If Not filterDate.Value = vbNull Then strCounter = strCounter + 1 If strCounter > 1 Then strChosen = strChosen & "AND " strChosen = strChosen &...
  7. C

    How to get last inserted ID in a table

    Hi, I have this code in Access VBA and it is not working, I hope somebody can give me some help on this: Private Sub btnAddWorkingday_Click() Dim strSQL As String Dim strDate As Integer Dim lastID As Integer strSQL = "INSERT INTO tblSchoolWorkingDays (CALENDAR_DATE) VALUES...
  8. C

    Labels printing on hlaf used label paper

    Hi, I have a report that shoud print on labels ready to be stick on a book, but how can I tell the report to start from 3th row 2nd column so I do not waste any labels? Thanks in advance for ssugestions
  9. C

    Memo field as real memo field in form

    Hi, What should I do so I can use memo field in database as a memo field so I can write text in more then one row. For example what is happening now when my user pres enter he does not go to a new row in memofield but he goes to new record. In fact how can I get something similar to this...
  10. C

    How to add keyboard shortcut to btn commant?

    Hi, I am using access 2010 and I created couple of buttons on my forms that do some stuff in vba, but beside triger them with mouse I would also like my users to be able to have shortcuts on keyboard so for example I have btnClose an I widh when user press ALT + that btnClose do the same thing...
  11. C

    Creating stand alone software from access database?

    Hi. Can somebody tell me is there a way to make stand alone software from access database that user can use without office? If not how can I protect my database so I can give it to somebody. Thx
  12. C

    LEFT function do not work in 2007 quary?

    Hi, In 2007 Access quary I can not use NEW_FILED: Left(tblAuthors.SURNAME, 3) I am getting error Expresion you entered contains invalid syntax You Omitted on operand or operator, you entered an invalid charter or comma, or you entered text withour surroning it in quotations, marks. Any ideas?
  13. C

    How to know from what form current form was open?

    Hi, I have a form called frmResoult that can be opened from 3 diferent forms, so when I am closing form frmResoult I wish to open form from wich I entered this form. Is that possible and how I had some idea in vba like if then but I do not now how to find command that can determeb where form was...
Back
Top Bottom