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???
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...
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...
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...
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...
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
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
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
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 <...