Search results

  1. M

    Date parameter works on query but not on report?

    Yes, the form remains open. And the date fields are text strings because that is the way they are passed from the calendar applet the form is using. I didn't write the code for the calendar and, if possible, I'd prefer not to touch it. If I can't convert the strings to dates in the SQL...
  2. M

    Date parameter works on query but not on report?

    I have a calendar control on a form so the user can select start and end dates for a report. In the after_update event of the calendar it puts the dates in text boxes, format dd-mm-yyyy. This part works fine. But when the user loads the report (which should use these dates) the report loads...
  3. M

    HELP I need to import a spreadsheet into Access

    If you want to see what value of range you have: open the spreadsheet in excel select record macro select all the cells you want to put into your database at the same time stop macro edit macro in visual basic and see the code
  4. M

    Chart question

    Nice link, that actually helps with a problem I was having elsewhere. Tried to help ya but ended up getting helped instead... :)
  5. M

    5 minutes interval

    Add this into your where clause in the query: (Mid(STR([GPS].[Time]),Len(STR([GPS].[Time]))-3,1)="0" or Mid(STR([GPS].[Time]),Len(STR([GPS].[Time]))-3,1)="5") Probably a better way to do it, but it looks at the minutes digit of the short date format and sees if it is a 0 or 5 (for multiples of...
  6. M

    Check to see if an item from a combobox has been selected

    If IsNull(Forms![frmsuppliercombo]![Combo2]) Then MsgBox "You must select a supplier. If the job is In House, select In House." Exit Sub Else DoCmd.RunCommand.acCommandSaveRecord Forms!frmMainClient![frmJob].Form.Requery End If Instead DoCmd.GoToControl, try just referencing the...
  7. M

    Chart question

    Did you try, from the form_Mouse_down event, translating to the coordinate system of the chart and then calling it? Ch_MouseDown (...,..., X-Ch.Left, Y-Ch.Top) It seems to me like it would take the X, Y coordinates of the form and then localize them to the chart, be just like it let you click...
  8. M

    Problem with requerying form in one specific case

    I'm having a problem with requerying a form's data values from code, with the line shown in red. The line works perfect 99% of the time, but after the green statements fire it breaks when data is reentered and gives me Err 2001: Operation canceled by you (I think that's the error message...
  9. M

    Query percentages

    Okay, apparently I don't have permissions to upload files at work, so I'll copy and paste the modified query here for you: SELECT DISTINCTROW [tblBooking].[* Regular Booking] AS [Booking Type], Sum([tblBooking].[* Fee Amount]) AS [Money Taken], Count([tblBooking].[* Regular Booking]) AS [# of...
  10. M

    Query percentages

    Yeah, I'm a retard and apparently didn't read all of your post, I'll work on it and let you know if I come up with anything
  11. M

    Query percentages

    I'm not sure if SQL evaluates BOOLEAN to a 1 for true and 0 for false or not, but if it does you could try the following: 100* [SumofRegularBooking] / [CountofRegularBooking] and false would be =(1 - (the same thing)) If it doesn't do this automatically you might be able to do sum with...
  12. M

    Coding not right?

    The On_Click event is for VBA code, and you are using a SQL query, they are 2 different languages, they go in different places. SQL is only for queries. If the values of some listbox or combobox depend on the checkbox, then you need to set this as a property of the combobox, not in the code...
  13. M

    Query using OR (AND) or both

    You could always build the SQL query in a VBA for... next loop to the number of suppliers you have ;-) Yes, I agree with you, normalizing the table is a much better way to tackle the problem, but in any case, to get the data with only a query and 3 suppliers, it should work.
  14. M

    Query Problem - Use Group By?

    You need to alias the employee table as two different names, so you can specify you are comparing its data to itself. This should work: SELECT (e.[firstname] & " " & e.[lastname]) AS employee, (s.firstname & " " & s.lastname) AS supervisor FROM employee AS e, employee AS s WHERE...
  15. M

    Query using OR (AND) or both

    I might be misunderstanding your problem but this worked for me: "tblJob" fields: job_no, suppler_no1, supplier_no2, supplier_no3. "tblSuppers" fields: supplier_id, company_name. SELECT company_name FROM tblJob, tblSuppliers WHERE (job_no = [whatever condition]) AND ( (supplier_no1 =...
  16. M

    String and numeric data comparison

    Thank you much, that worked just fine. Based on the results I manipulate other data, but this data does not need to be touched again, it is all input from a bar code scanner. The only problem was that the scanner can't distinguish between the bar code of the order number that tells which...
  17. M

    VERY SLOW process needs optimization

    I have a table which contains a part number, type of defect, x coordinate, and y coordinate of these defects. I need to make a visualization (similar to a finite element graph) of these a user selected defect overlaid on an image of the part with a user specified resolution. The way I did this...
  18. M

    String and numeric data comparison

    I need to make a query to compare equality of two pieces of data, one is a 6 character fixed-length text string (where the first character can be ignored) and the other is a 4 or 5 digit number (long integer, if 4 digit number can be assumed to be 5 with a leading 0). I do not have the ability...
Back
Top Bottom