Recent content by acarter1

  1. A

    Question Booking system using Access VBA

    Hi Mate, As i said before i am not too experienced on this type of thing. I'm guessing you need a loop to add a variable to a table until the variable is equal to a certain value something like: Private Sub Command1_Click() Dim MyConn As ADODB.connection Dim dt1 As Date Dim dt2 As Date Dim...
  2. A

    Question Booking system using Access VBA

    Right so design a query so when you run it, it only shows the records you want to back up. And then design a macro to use TransferSpreadsheet to the name of your spreadsheet and location etc. You can then run this macro via a button on a form or another event using vb code. There is a button...
  3. A

    Question Booking system using Access VBA

    Well you could use a query to find the records that you wish to back up and delete. Then base 2 queries on this a delete query and a append query. Then make a macro to run the append query to back up the data to another table and then delete them from the previous table. As for moving data to...
  4. A

    Fill combo box from new record automatically

    Ok so this is the code for the close button on the form: Private Sub close_Click() For x = 0 To Form_subfrmLeave.CourseID.ListCount - 1 If Form_subfrmLeave.CourseID(x, 1) = Me.CourseID Then Form_subfrmLeave.CourseID.ListIndex (n) End If Next On Error GoTo Err_close_Click DoCmd.close...
  5. A

    Msg Box Help

    You could use a loop on the opening of the form, which checks through the logged mileages and checks them against a statement of =<300 something like: Dim db As DAO.Database Dim rs1 As DAO.Recordset Set db = CurrentDb() Set rs1 = db.OpenRecordset("YourTableName") rs1.MoveFirst Do Until...
  6. A

    Fill combo box from new record automatically

    Alright that looks great! i'll have a try in work tomorrow. Just a couple of questions, Would i have to declare x and n as variables and if so what data type? And finally would this work on the close button of the course add form to reference to the subform on the main form. Sounds a bit hard...
  7. A

    Fill combo box from new record automatically

    Dear all, Thank you for all your support with the databases in the past! I have now come across one small problem in my database: I have a form with a subform, the form is the persons details and the subform is their leave record eg. date of leave to be taken, days off, name of course, reason...
  8. A

    Filter Using Combo Box On Subform

    Anyone know how to do this?
  9. A

    Keep text inputs in form when closed and reopened

    I think if you go on the properties of the textbox and set data entry to no. It could work it did on my last database I made. Otherwise you could add a little bit of code to your on exit event or the button you use to exit the screen to save the values of your textboxes to a few different...
  10. A

    Filter Using Combo Box On Subform

    That really didnt make sense at all. Basically i have a subform showing all the leave entries for each employee, these have a field on called "leave type" these are divided in to different leave types such as, annual leave, study leave, sick leave etc. i would like a combo box which filters each...
  11. A

    Filter Using Combo Box On Subform

    I have a form which shows firstname, surname and id in the main form and in the subform it shows their leave record, i want to filter my subform by a combo box, i want to filter the value that is on the leave code, these values can be: Leave CodeLeave...
  12. A

    Form dependent on date

    I am looking to display a form depending on the date. What i have currently in a module is: Option Compare Database If Date = "23/12/2009" Or "23/12/2009" Or "24/12/2009" Then DoCmd.OpenForm "frmSplashChristmas" Else DoCmd.OpenFrom "frmSplash" Will this work if i run this module on the...
  13. A

    Login form

    Yes! you did spark a bit of a brainwave, i have also added a little code on the form_load of the login to hide the database window and some on the click event of the login button to show the database window, it is all working great now! My code is as follows: DoCmd.SelectObject acTable, , True...
  14. A

    Login form

    well actually the combo box is a list of usernames, (like jbloggs1) so the employee id can't be equal to the value of the combo box haha, you spark off a brainwave! nice one mate i'll get back to you and let you know how it goes tomorrow!
  15. A

    Login form

    :mad::mad: This is killing me, i cant figure out the problem in my code.. i have a login form called frmLogin Combo box on this form called: cboEmployee Text box on this form called: txtPassword on this form exit button which works, the login button is called: cmdLogin This is the code...
Top Bottom