Recent content by sam1fletcher

  1. S

    VBA data.hasrow while loop

    Great thanks you were rite no need for a while loop just a couple of statement did the job instead
  2. S

    VBA data.hasrow while loop

    Sorry but its literally the loop which is bugging me. isee what your saying but does the last "else" statement cover that and so should display the MsgBox???
  3. S

    VBA data.hasrow while loop

    Hey All Basically i have connect my program to an MySql database I have a while loop which i think the code is fine but wont work properly. it basically checks the username and password in if is not correct create a simple MsgBox. If the username and password is correct then is works also if...
  4. S

    SQL Code

    it basically counts up all the bookings and subBookings for each school. I cannot change the name of the section in the Table as its used in much more things. I could program it so it looks at every booking but thats is bad programming and Usage so i want to use an SQL statement to seperate...
  5. S

    SQL Code

    Dim rs As DAO.Recordset Dim rsb As DAO.Recordset Dim rsb1 As DAO.Recordset Dim db As DAO.Database Dim Cnt As Integer Cnt = 0 Dim SchName As String Set db = CurrentDb Dim sql As String sql = "SELECT * FROM tblSchool" Set rs = db.OpenRecordset("tblSchool") With rs .MoveFirst While Not .EOF...
  6. S

    SQL Code

    Hi i keep getting runtime error 3075 missing opperator Code: Set rs = db.OpenRecordset("tblSchool") With rs .MoveFirst While Not .EOF SchName = rs("SchoolName").Value sql1 = "SELECT * FROM tblBooking WHERE School Name =" & SchName the error is on the last line and im guessing its because...
  7. S

    Using variables in dates

    cheers eugin
  8. S

    Using variables in dates

    hi all i would like to use a variable for the year in my date range. this it what i thought it would be: Dim ye as integer ye = 2013 If Sdate < #4/1/ye# then 'do something Else 'do Something end if Obviousely this is wrong. the first line of the if statement is higfhlighted any ideas Sam
  9. S

    adding Values to Graphs

    Legend nice1 found how to do it wasnt straight forward haha cheers sam
  10. S

    adding Values to Graphs

    as i said its a form which default view is pivot chart so when in design mode the for is veiwed not the chart?? any ideas
  11. S

    adding Values to Graphs

    to be honest mate i cant got some info in it. is there no other way of getting to chart options. im using ms acces 2010
  12. S

    adding Values to Graphs

    my graph is a form in chart veiw. when double clicking on it no menu appears what you are explaining sounds like it could solve the problem but i just cannot get to chart options sam
  13. S

    adding Values to Graphs

    Hi i was wondering if there is anyway you can add the values onto a graph eg i have created a bar graph and on each bar would like the value shown on the top of it Sam
  14. S

    VBA Date problem

    What a nob i am thanks sam
  15. S

    VBA Date problem

    hi all the code i have works for every other month of the the year but not for feburary. the code is simple :: if within 2 dates then edit the recordset. If Sdate > #2/1/2014# And Sdate < #2/30/2014# Then .Edit !feb2 = !feb2 + Amount .Update End If If Pdate > #2/1/2014# And Pdate <...
Top Bottom