Search results

  1. D

    Code to delete records in a Table

    If you want to delete ALL the records use the following Docmd.RunSQL "DELETE * FROM NameOfTable" If you want to supress the warning message use DoCmd.SetWarnings False DoCmd.RunSQL "DELETE * FROM NameOfTable" DoCmd.SetWarnings True HTH
  2. D

    Display tasks in a time line

    Here is an example of what you are looking for. I didn't design it myself, I found an example on the Internet and changed it to suit my purposes. HTH
  3. D

    opening up a word document from a button

    John, It runs through each the listbox checking, which item is selected. It's not necessary for this example as only one item in the listbox can be selected, but I was feeling lazy when I wrote the code and copied bits of it from a multi-select listbox that I had used elsewhere in the...
  4. D

    Maximise and Restore !!!!!

    On the Report Close event, type DoCmd.Minimize HTH
  5. D

    BeforeUpdate

    I set up my message boxes slightly differently, but find I have more control over the user response. Give the following code a try: Dim Msg As String Dim Title As String Dim Result As Integer Msg = "Write message here" Title = "Title of Database" Result = MsgBox(Msg, 35, Title) 'Question...
  6. D

    querydefs

    I may be wrong (and I'm sure I'll hear about it if I am :D ), but querydefs are temporary/dyanmic queries. The only reason I can see for using a query, which is being created everytime it is required is if the criteria for the query could drastically change everytime. i.e. You have a form...
  7. D

    opening up a word document from a button

    I do something similar myself. I have a form with a listbox on it. The listbox displays all the records from a cuople of tables. Beside the listbox I have half a dozen or so command buttons, which, when pressed, will insert the selected persons details and insert them into a Word document...
  8. D

    Deleting Records from Table

    All you need to do is add a command button to the form and follow the wizard to delete the record. I've attached the updated example. HTH
  9. D

    Looking for help with Payroll DB

    I've added three update queries, which will automatically update the rate of pay depending on the length of time employees have been with the company. I haven't got time to look at the overtime bit and bobs and the moment, but if you're still have problems I'll have a look at it towards the end...
  10. D

    repeating records

    It sounds like you need a group header for the Project and then you should only get one page for each project.
  11. D

    Opening Forms From Value List

    I've attached a very rough and ready example of what I think you are looking for. HTH
  12. D

    Looking for help with Payroll DB

    I've made a few changes and uploaded the version. I've added a new table, which details the hourly rate and then added this table to the Employees query. I've then changed the report the query is based on and it now shows the hourly rate * the no. of hours worked. HTH
  13. D

    Hide Focus with Control Error

    The syntax for referencing a subform is Form!MainForm!Subform.Form.ControlName so for your database it would be Form!NameOfMainForm!subfrmVersion.Form.chkWellness.Visible = False HTH
  14. D

    Wheel Thingy On Mouse

    If you only want the users to be able to view one record and not be able to mpve to the next record, select the properties of the form and and change the 'cycle' option from 'All Records' to 'Current Record'.
  15. D

    Cancel new record command

    Place a command button (i.e. CmdDelete) on your form and add the following on the On_Click event of the command button Dim Msg As String Dim Title As String Dim Result As Integer Msg = "Are you sure you want to delete this Record?" Title = "NameOfDatabase" Result = MsgBox(Msg, 52, Title)...
  16. D

    On No Data Event

    Before the code from the form opens the report type: On Error Resume Next So the code behind your form should look like On Error Resume Next DoCmd.OpenReport "NameOfReport" HTH
  17. D

    Auto-filling a list box

    That's going to be a bit more difficult due to the way Access lists values. i.e. you have the values 1, 2, 11, 112. If you list them ascending, Access will list them the way I have typed them in, but in order for the example to work they would need to be 1, 11, 112, 2 as you could then type in...
  18. D

    Combo and list box help

    I've changed the example that PARSO posted and it should now do what you want. HTH
  19. D

    Can a msgbox have its button names changed?

    Sue, Look up 'MsgBox Constants' in VB help and it will show you the buttons available, but from the sounds of what you want, you will probably have to create your own form. HTH
  20. D

    Multi-select listbox to create report

    You will need to create a dynamic query and report. As SJ McAbney said, search the forums as there are lots of examples of this. Also take a look at http://www.rogersaccesslibrary.com/download3.asp?SampleName=ChooseReportFields.mdb HTH
Back
Top Bottom