Search results

  1. C

    incrementing date as a primary key?

    As a primary key, I am using a date, well, at least it is unique, yes? Even if it isn't ideal. Is there a way of making the date autoincrement, like the autonumber does? I thought it may be easier than having to type in a date every day, also the application I am working on will need to have...
  2. C

    Create Dynamic Query from a form

    you can also populate your textbox using Dlookup for example Me.txtBoxName.Value = DLookup("[FieldNameFromQuery]", "QueryName") hope this helps
  3. C

    how can i calculate to get the total accumulated hours

    Can you be a little more descriptive please. Can you tell me basically what the data looks like? For example, I have been working on a application that calculates how much over time a person gets i.e. how much time and half and double time if a person worked over their alloted hours. I think I...
  4. C

    create a query based on two list box values?

    nailed that one, the square brackets were around the wrong argument. Thanks for your help and patience :)
  5. C

    create a query based on two list box values?

    When I used the form, two consecutive prompts appear, asking the user to enter the dates required, I then changed the code sllighty, as per my last post, which now seems to work. I then tried what you just suggested: Me.txtResult = DLookup("totalhours", "[combo box hours query]") Which I...
  6. C

    create a query based on two list box values?

    OK, I now have something working using the following code: Private Sub cmdDisplayHours_Click() On Error GoTo Err_cmdDisplayHours_Click Dim stDocName As String If IsNull(Me.cmbStartDate) Then MsgBox "Please Enter A Start Date!" ElseIf IsNull(Me.cmbEndDate)...
  7. C

    create a query based on two list box values?

    here is the sample db, hope it is small enough, you will notice that I have created a number of queries based on the hours table, the date being the primary key. I heard a few people complaining about using a date as a primary key ut since it is totally unique, personally I don't see any...
  8. C

    create a query based on two list box values?

    SO far I have got to using this: SELECT Sum(Hours.Hours) AS TotalHours FROM Hours WHERE (((Hours.Date)>=[Forms]![hoursCheck].[cmbStartDate] And (Hours.Date)<=[Forms]![hoursCheck].[cmbEndDate])); as the criteria of rhe query, but when I run the query from the command button on my form, the user...
  9. C

    create a query based on two list box values?

    I don't suppose you could give me a step my step instruction on how to achieve this could you?
  10. C

    create a query based on two list box values?

    PS how do I add a sample Db to a post?
  11. C

    create a query based on two list box values?

    not sure what you mean by "bound" I created a query using the wizard that shows all the dates and hours worked on that particular date and I used this query for a basis of a form, which utilises the query to populate the combo boxes. As for what to do next, to be honest I am stuck. Could you...
  12. C

    create a query based on two list box values?

    sorry I didn't reply to your post earlier, I was locked out from replying for some strange reason, I believe it was a permissions error. Anyways, I made an error previously when I said two list boxes, I should have stated two combo boxes. I tried what you suggested but Access comes back with an...
  13. C

    create a query based on two list box values?

    Hi Folks, Could someone please point me on the right direction, I need to create a query that is based on the selection of two list boxes, where the selections are dates. I have a basic table which contains a date and the hours worked for that date. I need to select a start date and an end...
  14. C

    using if/else in an SQL query

    I found my answer Hi there peeps, Since I only had one response, I had to do a bit more thinking and came up with this simple remedy to my problem by using the IIf function: IIf(expression, true, false) UPDATE tblEnrolment_3 SET Mode = IIf(FTPT Like "FT*","FT","PT"); As you can see it...
  15. C

    using if/else in an SQL query

    hello peeps, I need to update a column based the values of another column. The problem I have is that the other column has four diffferent values so I am at present using two separate queries using the LIKE operator (LIKE "FT*" where the values are FT and FTunit, and NOT LIKE where the values...
  16. C

    web page on a form

    brilliant thank you very much chris
  17. C

    HELP (urgent)

    why do a countdown? do a DateDiff() query which can tell how long ago the last service was? Chris
  18. C

    is it possible to update/append only one record

    hi, I wonder if you can help me? I want to update a record by means of setting flag, trouble is my update query is updating ALL records and not just the one I want. Any ideas gratefully received. Chris
  19. C

    get focus

    right click on your form while in design mode and select tab order, from the resulting popup you can drag the focus settings into whatever order you like
  20. C

    List Box Data disappearing

    have you gat a save record button on your form and an add new record on the form?
Back
Top Bottom