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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by intern42

  1. intern42

    Referencing a list box property in a query

    I have a listbox (lstTookCourse) where a user can select multiple names. There is a "hidden column" that contains a field called "personnelID" which is the primary key for a table. I need to reference this value in a query. In the module, I can access this value on a name...
  2. intern42

    INSERT into table with Auto Number?

    OK, I forgot that I set an error trap... that's why I didn't get an error message. It's a syntax error in the INSERT INTO statement: DoCmd.RunSQL _ "INSERT INTO CoursesDates (courseID, dateOffered, time, hours, seats) VALUES (" & Me!cboCourse & ", #" &...
  3. intern42

    INSERT into table with Auto Number?

    Same thing. It displays all message boxes BEFORE the DoCmd.RunSQL command, but nothing AFTER that command. Weird.
  4. intern42

    INSERT into table with Auto Number?

    I checked that, and unfortunately, I matched everything up. Here's the SQL command: DoCmd.RunSQL _ "INSERT INTO CoursesDates (courseID, dateOffered, time, hours, seats) VALUES (" & Me!cboCourse & ", #" & Me!txtDateOffered & "#, " & Me!txtTime & &quot...
  5. intern42

    INSERT into table with Auto Number?

    I'm trying to run an INSERT statement on a form and it doesn't work... I've done this same thing on several other forms with no problem, the only difference is with this INSERT, I'm inserting into a table who's primary key is an auto number. So for the INSERT, I only listed the other columns...
  6. intern42

    Yes/No field variables on report from UNION query

    Thanks. That helped. I forgot to drag the checkbox item onto the form. Gotta love Mondays.
  7. intern42

    Yes/No field variables on report from UNION query

    I have a Yes/no field called "required" that comes up as a checked or unchecked box when I reference it in a report. For my latest report, I had to build a query that combined 3 different SELECT statements with the UNION command. In the report I generated from this query, the...
  8. intern42

    Storing values of a table in a VB variable?

    That's it man!! Thanks a TON. That was the LAST bug I had to work out of this application. Much appreciated.
  9. intern42

    Storing values of a table in a VB variable?

    That looks good, but I now get the error: Run time error 3075: syntax error (missing operator) in query expression '[RecNumber] = & 1'. when this line of code executes: IsKey = DLookup("[CountOfRecords]", "Key Exists", "[RecNumber] = & 1") "Key...
  10. intern42

    Storing values of a table in a VB variable?

    Thanks Bob. I know how to dimension variables, my problem is how do I get the results of this SQL statement: SELECT COUNT(*) FROM PersonnelCourses WHERE PersonnelID = Me!cboPersonnel AND courseID = Me!cboCourses; This query will return a one-cell table with either a zero or a one in the...
  11. intern42

    Storing values of a table in a VB variable?

    I'm using an Access 2000 database and need to check the value of a table to decide on an action to perform. Basically, I have an SQL query that returns a one-cell value of either 1 or 0. If the value is zero, I need to add a row to a table; if the value is one, I need to update a row of a...

Part and Inventory Search

Back
Top