Search results

  1. 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...
  2. 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...
  3. 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
  4. 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
  5. 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 <...
  6. S

    SQL problem

    hi I have a problem with my query. the problem: i have a table of schools(tblschool) the table has a County feild which is text and 2 Y/N feild called HMC and GSA. i want to be able to retreived records that are in a specific county and have one of these ticked. Simple rite! but the problem...
  7. S

    open specific tab and hide the others

    hi all problem: i have a hidden tab window with 5 tabs i would like only a certain tab to be visible at one time instead of bringing every tab to be visible Sam
  8. S

    SQL and recordset Help

    Hey All got runtime error 3061 which i realised my sql code is wrong Dim rs As DAO.Recordset Dim sql As String Dim ct As Integer sql = "SELECT * FROM tblBookings WHERE (((tblBookings.Date_Start) Between [Forms]![frmMenu]![ArrivalDate] And [Forms]![frmMenu]![ArrivalDate]+29)) OR...
  9. S

    Pivot Table and Chart Problems

    Hi All having a big problem creating a pivot table and chart. i made a pivotTable from a query which simple lists the sent and paid dates of invoices. when i first creat the table i use the "sentDate by month" range which access automatically gives you to create a range of dates for the x axis...
  10. S

    Counting Invoices per month

    hi all I have a table which has sentdate invoices and paiddat invoices. i want to be able to get a monthly count for the amount of invoices sent and paid to compare on a graph. e.g jan 2011 = 5 feb 2011 = 6 ect Can anybody point me in the rite direction Cheers
  11. S

    Multi Value ComboBox......

    Hey folks anyone know if it is possible to grab certain data from a multi value comboBox EG.. MY combobox, when it when drops down, shows 3 values from another table ID, Firstname, Surname. i want to be able to JUST get the surname of the selected data????? Sam
  12. S

    creating a grid on a form

    hey all what is the best way to create a grid on a form for example 10x365. is there any other way round it rather than creating 365 fields in a table then creating the corresponding textboxes for them. or can something be drawn then the information of each node be stored in a variable and...
  13. S

    Using Variables in private sub headings

    I have a range of 52 textboxs named Ctl1-Ctl52. now instead of creating 52 event procedures for each text box i would like to create a loop. I dont know if this is possible but would save alot of time if it is can someone help?? so i expect something like this Dim i as int i = 0 While i <=52...
  14. S

    Searching through recordsets

    I am trying to find a certain record in my record set then grab is ID number and assign it to a variable. when i set up my record set i get an error "Operation is not supported for this typ of object" Code: Dim schID As Integer Dim Schools As DAO.Database Dim sch As DAO.Recordset...
  15. S

    Adding to tables DAO recordset

    I have been trying to add records to table from a form and got a runtime error item not found in this collection. The bale is linked to another table like this: tlbSchool"one------->"many" tblContacts(table im inserting data) and bothe have a feild school and that is the line flagged up for...
  16. S

    Vba Bulk Email code with ADO recordset

    Hey I have this code which works in another database to send a bulk email collecting data from a query. not sure where the code goes wrong as it works in another program The error is Expected SQL statement SELECT etc Code: Dim cn As ADODB.Connection Dim rs As ADODB.Recordset Dim...
Top Bottom