Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. jamessl

    refering to a variable in SQL string

    Please don't answer this - the SQL syntax is fine. Just had a cup of coffee and woke up.
  2. jamessl

    refering to a variable in SQL string

    Hi this should be simple - I just need to refer to a variable in an SQL string in my VB code. The string is - rstUpdate.Open "SELECT * FROM [Customer Orders] WHERE [Cancel Booking] = False AND [Date Ordered] > #08-20-02# AND [Tour Date] > #" & Format(Date, "dd-mm-yy") &...
  3. jamessl

    SQL syntax problems

    Thanks, indeed looks like the reason I am having problems - I am not sure exactly why the array is null because it is supposed to be full, but I will attempt to get to the bottom of it - time to do some debugging. If I am still having problems after looking into the code you may well hear...
  4. jamessl

    SQL syntax problems

    Ok, River Guy, it is not all on one line - thought I would put it into one line in my example on this thread to get rid of some of the quotation marks and '&'s. So in my code it looks like - Forms![Bookings]![Bookings - Subform 1]![Start Time].RowSource = "SELECT [Start Time] FROM...
  5. jamessl

    SQL syntax problems

    Can anyone point me to some kind of reference which points out the ground rules for the SQL syntax in an SQL string in Visual basic. It obviously differs from that you see in the SQL view of a standard Access Query grid. The Access help function only has limited examples it would seem. My...
  6. jamessl

    Date syntax in SQL string

    thanks, knew there was a better way - just got your reply after I had sent mine.
  7. jamessl

    Date syntax in SQL string

    got it... don't know if this is the best way, but created an extra hidden field on form and formatted the date as mm/dd/yy. Then just referred to this field, FormatDate in the SQL string. seems a bit silly to have to do this, but it works so who cares. I reckon there should be some way to...
  8. jamessl

    Date syntax in SQL string

    Well, I still can't get any records with the expression typed as you suggested. If I put a date directly into the expression eg WHERE Date = #29/07/02# it still returns no records. If however I enter the date literal in US format eg WHERE Date = #07/29/02# it does return records. My problem...
  9. jamessl

    Date syntax in SQL string

    Hi, does anyone know the correct syntax in an SQL string as part of the Recordset Open method to refer to a field on a form. I currently have - rstBookingsSchema.Open "SELECT * FROM BookingsSchema WHERE Date = " & Forms!BookingForm!Date & " ORDER BY Period", conn, 1...
  10. jamessl

    Create a recordset in a VB module from a table

    Thanks,have managed to select my records now. one thing though, I have had to use the open method to create the recordset as follows Set conn = CurrentProject.Connection Set rstBookingsSchema = New ADODB.Recordset rstBookingsSchema.CursorType = adOpenDynamic...
  11. jamessl

    Create a recordset in a VB module from a table

    Tried that thanks, but still not finding in records - It must be something to do with the way I am retrieving records for the recordset. any ideas?
  12. jamessl

    Create a recordset in a VB module from a table

    Thanks for that. Well I have entered that code, of course tailored to my situation as follows - Dim conn As Connection Dim rstBookingsSchema As Recordset Set conn = CurrentProject.Connection Set rstBookingsSchema = _ conn.Execute("SELECT * FROM BookingsSchema")...
  13. jamessl

    Create a recordset in a VB module from a table

    First up I am a VB rookie. I am writing a VB module which edits a group of records in a table based on some information entered on a form. I need to write a module as the manipulation/editing of the records is slightly complex. My (simple) question is - I need to select a group of records...
  14. jamessl

    Create Records in a New table based on intervals in a range

    Thanks, will be a while before I can integrate this into my ever evolving project, but it looks perfect..
  15. jamessl

    Excel Charts - need help designing/customising charts!

    I wish I could but, I need to have the data displayed in a graphical format so that the data is user friendly, ie the users of the system can see all of the time intervals in a 24 hour period and the employee number at each time interval (between the Time Out and Time In values for the give...
  16. jamessl

    Excel Charts - need help designing/customising charts!

    I think this might be complicated, but I am hoping it isn't. Firstly, I have data that will need to be imported from a table in Microsoft Access. An example of the data fields is - Employee Number Time Out Time In 161 07:00 06:00 84 08:00...
  17. jamessl

    Create Records in a New table based on intervals in a range

    I have a Booking table (fields - Employee number, Date, Start time, Finish time) in which an employee enters a start and finish time for when they will be booking some equipment - eg Employee Number - 1, Date - 23/07/02, Start time - 10:00, Finish time - 18:00. How would I get a query (Code??)...
  18. jamessl

    Filter data by exluding records retrieved by query

    In fact the unmatched query wizard was all I needed in this case. Doh! with a capital D! Thanks for your responses. James
  19. jamessl

    Filter data by exluding records retrieved by query

    Thanks! - will give it a go today and let you know how I got on...
  20. jamessl

    Filter data by exluding records retrieved by query

    This seems simple enough...but I don't know how to do it! I have a query that selects records based on date criteria from a table called Bookings. The returned data can contain more than one record with the same Employee number (in the Employee Number field). I want a query or form which...

Part and Inventory Search

Back
Top