Recent content by ih8code

  1. I

    how to filter a form based on option buttons AND checkboxes at the same time

    so i cant do what i want? i did quite understand what u mean :p
  2. I

    how to filter a form based on option buttons AND checkboxes at the same time

    Hi.I just want the code for this "if i check option 1 run this query.if i press option 1 AND checkbox1 run this query,and every other possible combination of option buttons and check boxes.Also i want,at least one check box,to be mandatory so if the user didn't click a check box then display a...
  3. I

    how to filter a form based on option buttons AND checkboxes at the same time

    Hi! I created a form that has a button and 4 option buttons.I use the following code to export the data to an excel file: Dim xlapp As Object Set xlapp = CreateObject("excel.Application") On Error Resume Next If IsNull(Me.Frame22.Value) Then MsgBox ("You must select a filter!"), vbOKOnly...
  4. I

    sum of the same field,many times,with different criteria,in the same query

    It works!!!You're just awesome :p Thank you very much.
  5. I

    sum of the same field,many times,with different criteria,in the same query

    thanks for the reply. I wrote this SELECT maintable.userlogon , IIF(Papersize = "A4", maintable.PageCount,0) AS SumOfA4 , IIF(Papersize = "A4" and color = True, maintable.PageCount,0) AS SumOfA4Color , IIF(Papersize = "A4" and color = False, maintable.PageCount,0) AS SumOfA4BW from maintable...
  6. I

    sum of the same field,many times,with different criteria,in the same query

    I have managed to find the code for number 1 only :p SELECT maintable.userlogon, Sum(maintable.PageCount) AS SumOfPageCount FROM maintable WHERE (((maintable.Timestamp)>=[forms]![reportsform]![frmdate] And (maintable.Timestamp)<DateAdd("d",1,[Forms]![reportsform]![todate]))) GROUP BY...
  7. I

    sum of the same field,many times,with different criteria,in the same query

    Hi there, I have a table [maintable] that holds print records, with the following fields : id,userlogon,printername,pagecount,color(yes/no),duplex(yes/no),timestamp and papersize. I want to create a query that will show the following: Sum of pagecount where papersize like 'a4' and between 2...
  8. I

    Mandatory Data Entry In Field Before Moving to Another Field

    Nevermind i thought of another way that works :) Here's what i did: Private Sub Address_Enter() If Me.VAT_registration_no = "" Or IsNull(Me.VAT_registration_no) Then MsgBox "Please enter a Vat Registration No.", vbOKOnly, "Error" Me.VAT_registration_no.SetFocus End If End Sub I did that on all...
  9. I

    Mandatory Data Entry In Field Before Moving to Another Field

    I'm sorry but i didn't have time to test it at work.And at home i have 64bit access so the code doesn't work there and i don't know what to do to fix it :p After i wrote Option Explicit, i had to declare all variables.Besides that i didn't see any difference.The problem remains.When i write...
  10. I

    Mandatory Data Entry In Field Before Moving to Another Field

    Hi, i have a form that users will use to add new records (customers). there is a field named VAT_Registration_no first of all i want some code to check for duplicates in that field only,before entering the next field.If the record exists i want to show a msgbox and set focus to the...
  11. I

    search form.plz help!!!

    Ok thanks anyway :)
  12. I

    search form.plz help!!!

    so i could make a filter on load like "where first_name="adfvearg" so it returns nothing,but will the search field work then? and if it will can you please tell me the syntax of the filter on load property?or i have to make an sql query and just right the name of the query in the property field...
  13. I

    search form.plz help!!!

    Yes!I did myself though :) i found the code for the search button and i made the form.It is a continuous form.One thing i can't find now is how to make the form show no data at all when i open it.Because when i open the form i get all the data from the table until i use search.Is there something...
  14. I

    search form.plz help!!!

    Hello.I want to create a search form for a database.The database is simple.It has three tables (employees,departments and company).the fields of the employees table are:first name,last name,internal phone,department and floor. I want to use this db to search for internal phones but i dont know...
  15. I

    cost per page calculator

    Hi,i made this form to calculate cost per page of a printer.I just want your opinions and any ideas for improvement :) i also have a problem.Why i need to press the button twice to apply the vat?pressing it once changes the value in the table but doesnt show in the form.i have to press it twice...
Back
Top Bottom