Search results

  1. Courtman

    Query over past six CALENDAR months

    Brilliant, my SQL query now looks like this: SELECT Sum([Log Entries].[Instr Apps]) AS [SumOfInstr Apps] FROM [Log Entries] WHERE [Log Entries].[Date] > DateSerial(Year(Date()), Month(Date())-6,1); and works perfectly. Thank you!
  2. Courtman

    Query over past six CALENDAR months

    Hiya all I'm trying to write a query which looks back over the past six calendar months - i.e. from today back to 01-Mar-2008. Can anyone recommend the easiest way to do this in a query please? Thanks!
  3. Courtman

    VBA code to change a child form

    Thanks for the sample code Meltdown, I had something similar already but its refined it nicely! And saved me on two subforms! Marvellous, thanks once again.
  4. Courtman

    VBA code to change a child form

    I have a form with a child-form which displays the results of a query. On the main form are three radio buttons which select different queries in the child form. I'd like to use a VB code to change from one query to the next, depending on which radio button is pressed. How would I best do...
  5. Courtman

    Sub-totals at the bottom of each report page

    I have a report which lists logbook entries. At the bottom of the first page I'd like the report to give the total for the page. The totals for this page then carry forward to the top of page 2, and at the bottom of page 2 get a total for all of page 1 and page 2. Is this possible in Access...
  6. Courtman

    Deleting a record with VB

    Thanks, all works fine - much appreciated and much tidier than anything I've tried before!
  7. Courtman

    Deleting a record with VB

    Thanks for that, worked a treat. Funny how you can stare at a problem for ages, and the solution is soooo simple... I did the AcUndo command, then close the form and re-open it to refresh it. Is there a way of clearing all the fields in the form without the close and re-open line? Also, I...
  8. Courtman

    Deleting a record with VB

    Nope, still comes up with the same error and the debug comes back on the DoCmd.RunCommand acCmdDeleteRecord line... And in answer to your second question, I guess undo. The controls on the form are bound to the table though (this is probably messy but its the way its always been), so I kinda...
  9. Courtman

    Deleting a record with VB

    Hi I have a form with a "Clear Form" button on to allow the user to delete the record they are working on without updating the database. A question window pops up asking if they are sure they want to delete the record, if they answer yes the form will clear and re-load without updating the...
  10. Courtman

    Changing a query with a radio button

    Hi all Can someone advise if this is possible and how I would do it please - I'm going round in circles trying to sort this little problem out! I have a form which posts the results of a query. The results of the query are in a subform, and on the main form are three radio buttons which allow...
  11. Courtman

    Requerying from a radio button

    I have a form with a sub-form embedded in it which displays the results of a query. On the form are 3 radio buttons - Date, Name, Number - which specify how the query is sorted. How can I re-query the sub-form whenever the radio button is changed?
  12. Courtman

    Date list-box?

    OK, an unbound text box would work. But I want it to have "scrollbars" to the side so the user can simply click the date to increase or decrease.... can't seem to find a tool to do this in Access 2000.
  13. Courtman

    Date list-box?

    I am trying to get a list box with todays date in as a default. I would like the user to be able to increase or decrease that date, and based on what they have done re-query a number of sub-forms to show results based on the differing dates. Can anyone please advise how to make a listbox (or...
  14. Courtman

    Sorting records on a form

    So if I were to run this code using radio buttons, could I do the same with an "OnClick" event? And how does that command know which field to sort by? Thanks for the reply, I'm a bit slow on some of this stuff!!!
  15. Courtman

    Re-sorting a query in a form

    I've posted this on the Forms queries, and duped it here just in case.... I have a form which contains a sub-form with the results of a query. I would like to add an option box which allows the user to re-sort the query by different columns. The options would be: SORT BY: Airfield Name...
  16. Courtman

    Sorting records on a form

    I have a form which contains a sub-form with the results of a query. I would like to add an option box which allows the user to re-sort the query by different columns. The options would be: SORT BY: Airfield Name (default) Date of First Visit No. of Visits ...and this would re-sort the...
  17. Courtman

    Query on two fields with one output

    Hi, I am trying to get a query to do the following. With this data: Date - From - To 01-Jan-02 - Luton - Manchester 01-Jan-02 - Manchester - Luton 02-Jan-02 - Luton - Fenland 03-Jan-02 - Leicester - Luton I want an output that would count the number of times I've visited Luton, Manchester...
  18. Courtman

    Referring to a query in VB code

    Hi I am trying to run a sequence of code that checks the results of a query when a form opens. I've called the sub Single_Validity(). Based on the results of the query the system will change the properties of a text box on the main form. How do I refer to a query in my VB code? I've...
  19. Courtman

    IIf function to change textbox properties

    Thanks for the input. I've solved the problem now by doing the following: If SingleCofRdue < date Then singlecofrtick.ForeColor = 255 End If If (SingleCofRdue - date) - 365 Then singlecofrtick.ForeColor = 65535 Else singlecofrtick.ForeColor = 32768...
  20. Courtman

    IIf function to change textbox properties

    Sounds like it might work. How would I write the case though? Would that be a validation rule?
Top Bottom