PH,
Thanks - that was it. I was getting the INSERT Into error because someplace along the line I had deleted "GroupID" from tblReqReadDocs. I moved the last Next to before rs.Close and it works great. Here's the final code.
Private Sub cmdAddRecords_Click()
On Error GoTo...
PH, I put in your code , but I'm getting a "Object variable or with block variable not set" error with this code.
Private Sub cmdAddRecords_Click()
On Error GoTo Err_cmdAddRecords_Click
Dim lbx1 As ListBox, lbx2 As ListBox, lbx3 As ListBox, tbx1 As TextBox, SQL As String, DQ As String...
At first I thought it would be adequate to track by group, but when I considered that employees could change groups I figured it would be best to track by employee. They don't change groups that often though. The reports we run, usually within a one-two month period after the reading...
In AC97, I'm trying to create a database of reading done by employees. The records go into tblReqReadDocs (DocID (PK),TopicID,SubjectID,GroupID,DueDate)using the code below
from frmAddReqReadDocs that has lbxTopicID, lbsSubjectID, lbxGroupID, and tbxDueDate.
Private Sub...
If I may expand on this issue, because the employees may move to a different group at a later date, I think I have to add the EmployeeID to tblReqReadDocs so I can retrieve which Docs each employee read.
Therefore, I would like to add the EmployeeID of each employee in the GroupID's added to...
I'm using Access 97. DAO 3.5 Object Library was checked, so I unchecked it, and checked DAO 3.6 Object Library. I still sometimes get crashes when I run a particular query. I'll take that issue to the query forum after I get a chance to research it.
Thanks,
Brian
I'm trying to create a report from the records in a query (qryReqReadDocs). The fields are GroupID, EmployeeID, TopicID, and SubjectID, as well as description fields for each. Each EmployeeID is assigned to a GroupID, and each SubjectID is assigned to a TopicID. There are typically 5-10...
TheAceMan1,
Your code works too. I don't know enough to say whether it is better or not. I'm still getting Access crashes with your code, so maybe I have some other code issues elsewhere. Or maybe my computer just isn't fast enough.
Thanks,
Brian
Works great!!! Here's what I have.
Private Sub cmdAddRecords_Click()
On Error GoTo Err_cmdAddRecords_Click
Dim lbx1 As ListBox, lbx2 As ListBox, lbx3 As ListBox, tbx1 As TextBox, SQL As String, DQ As String, itm, itm2
Debug.Print SQL
Set lbx1 = Me!lbxTopic
Set lbx2 =...
In AC97, I have a tblReqReadDocs with fields docID (pk), TopicID, SubjectID, GroupID, and DueDate. I have a frmAddReqReadDocs with lbxTopic, lbxSubject (multi-select), lbxGroup (multi-select), and tbxDueDate. I would like to add records to the table for each combination of selections from the...
Thanks MajP and PH. I'll set up my tables as suggested and try to set up the forms too. I may be back for more help on the forms. If so, I'll post in the Access Forms forum. I'll let you know how it comes out.
Brian
In Access 97, I'm trying to create a database for jobs, tasks (which are involved in the job), and hazards (which are involved in the task). The database will be populated by assigning hazards to the tasks, and tasks to the jobs. So for each job, there are various tasks to pick from, and for...
Duane, I didn't mean to make it look like I was ignoring MajP's suggestion, but I couldn't try his suggestion at the time because I wasn't at my Office 2010 computer. And since you responded first, I felt I should respond to you as soon as I could.
MajP's suggestion does work, after I changed...
Duane,
The Hour values in the lbxHour come from a query of the table tblHour30, with fields TimeID and Hour. The Hour field is a Date/Time type and Medium Time format.
Thanks,
Brian
In Access 2010, I'm trying to change a text box (tbxSheduleDate) to be the combination of the date (from date picker DTPicker1), and the time from a listbox (lbxHour)of hourly values. I tried the following but is doesn't work.
Private Sub lbxHour_Click()
Me!tbxScheduleDate =...
I get a syntax error (missing operator) with the dates in the INSERT INTO statement in the cmdAddRecord_Click code.
The format of the fields in tblChemicalOrders are as follows:
OrderDate - date/time (only date part used)
ExpectedReceiveDate - date/time (only date part used)
OrderQuantity -...
I'm trying to troubleshoot a problem with a pretty simple 3rd party program that uses an Access database for data storage and reporting. When the program starts, the startup page comes up as expected. Reports run OK. However, there is a problem with one of the data input screens.
The vendor...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.