below is the code I am using to update multiple records on a sub form so that QtyReceived=QtyOrdered when you click the ReceiveButton, now my understanding of VBA is a little limited and the code I'm using won't work in my main form "frmReceiving" only in the subform "frmReceivingSubform" can anyone see what I'm doing wrong?
Private Sub ReceiveButton_Click() Dim rs As DAO.Recordset
Set rs = Me.frmReceivingSubform.RecordsetClone
With rs
.MoveFirst
Do While Not .EOF If rs("QtyReceived") = 0 Then .Edit rs("QtyReceived") = [QtyOrdered] .Update End If .MoveNext Loop
I have developed a Tax Assessment solution using Access 2003, I already have in excess of 150k records, I have 7 tables; 55 queries; 30 forms.
My main table "Transact" has over 175 fields (yep I know its large, but I need all these fields and dont want to create 100's of tables). Since last week I cannot save any definition changes to my table, I keep receiving error 3309. I have searched all discussion groups but cannot find any decent solution. 1. I have not changed the index's, of no duplicates 2. I do not have more than 255 columns in table 3. I have increased the maxlocks substantially 4. run a compact & repair succesfully
What else can I try, as mentioend I am reluctant to split Transact into smaller tables. Regards Gto
main - [Welders fm], 2nd level - [PipingQualificationTickets tbl Subform] 3rd level - [WelderWps fm] This is a pop up form but is related to the 2nd level formVBA Error
I have a dropdown box [Wps] (3rd Level PopUp) with an after update function to lookup a query [DLookUpWeldWPS Qy] and insert the text into [Wps(s)QualifiedFor] on the 2 level [PipingQualificationTickets tbl Subform]
Is Query of 'RecordsetClone' possible? (.mdb database on desktop/laptop - single user - no servers) I want to run an update query on a form's underlying query/filters in VB - i.e. the RecordsetClone. I cannot use the query for the form as the fields used by the query have been changed. Logically, what I need to do is below, in the code fragment. Set rst = Me.RecordsetClone Set qdf = dbs.CreateQueryDef("", "UPDATE rst SET rst.Checked = " & bool & " ;") qdf.Execute Microsoft Jet doesn't recognize 'rst' in the sql statement, and this fails. Travis
I have three forms that are related to each other. When i click on a button on the second form I get this error: an expression that has an invalid reference to the property form/report. But why do I get this error??
At the third form I have two sub forms.This code are in the first sub form: Segment_subform. Sub Form_Current()
Dim ParentDocName As String
On Error Resume Next ParentDocName = Me.Parent.Name
If Err <> 0 Then GoTo Form_Current_Exit Else On Error GoTo Form_Current_Err Me.Parent![Blokk_Subform].Form.Requery End If
I think it's something wrong with Me.Parent![Blokk_Subform].Form.Requery. It doesn't recognize blokk_Subform.
My problem is this: Whenever I enter something into the form other than first choosing the date from the DateTimePicker's drop-down list, I get the notorious error message: Can't set value to NULL when CheckBox property = FALSE.
What I can conclude is that the DateTimePicker can seemingly not return a null value to the database. A possible solution was given at this site: http://www.dotnet247.com/247reference/msgs/54/270422.aspx
I however, have no idea how to apply this to my form.
The expression On Click you entered as the event property setting produced the following error: Procedure declaration does not match description of event or procedure having the same name
Now this is the error message that I am constantly getting from any command button I hit on a certain form. Here is the code of the form.
Option Compare Database Option Explicit Public inputCSV As String, ORG As String
I changed the names of the buttons, reconstructed the code under those names, went to the modules and changed names, made sure that a sub o function name is not duplicated in the project... But helas the error is still there. It used to work and suddenly does not work.
I search a record with values that I am taken from form1 . If i found the record i show it on the form2 else I add a new record to table with values that i am taken them form form. this is my code: Code: Dim stDocName As String Dim stLinkCriteria As String stDocName = "mainhazineh_m" DoCmd.OpenForm stDocName, , , stLinkCriteria Form_mainhazineh_m.mahp.Value = Form_mainform_m.Combo2.Value Form_mainhazineh_m.salp.Value = Form_mainform_m.Combo0.Value Form_mainhazineh_m.RecordsetClone.findfirst "[salp]= " & Form_mainform_m.Combo0.Value & " And [mahp]= " & Form_mainform_m.Combo2.Value & " And [shahrp]= '" & Form_mainform_m.Combo12.Value & "'" If Form_mainhazineh_m.RecordsetClone.RecordCount <> 0 And Form_mainhazineh_m.RecordsetClone.NoMatch = False Then Form_mainhazineh_m.RecordsetClone.edit Form_mainhazineh_m.RecordSelectors = True Form_mainhazineh_m.Bookmark = Form_mainhazineh_m.RecordsetClone.Bookmark Form_mainhazineh_m.RecordsetClone.Update Else Form_mainhazineh_m.RecordsetClone.AddNew Form_mainhazineh_m.mahp.Value = Form_mainform_m.Combo2.Value Form_mainhazineh_m.salp.Value = Form_mainform_m.Combo0.Value Form_mainhazineh_m.shahrp.Value = Form_mainform_m.Combo12.Value Form_mainhazineh_m.RecordsetClone.Update Form_mainhazineh_m.Bookmark = Form_mainhazineh_m.RecordsetClone.LastModified End If my problem is that when i must add new record to db, it only change the first record of table with values that i make them red then add a new record that all fields of it is empty. can anyone help me ?
When attempting to select a letter in a form copied from the Northwind's Customer Phone List Form, I am now getting an error message that says "The object doesn't contain the Automation object "RecordsetClone'". I never had that problem before. Appears to be something in the Option Group that has gone awry, but I cannot access the Visual Basics behind the Macro. Is there a way to suppress this message? It does not appear to be a problem in bringing up the sought after page. :confused: :confused: Please help!!
I have a problem. The problem is that I have a form contains two list boxes controls and a calender control. The calender control is invisible by default. When I click a Show button, to show the calender contol, it appears but behind the list boxes controls. How can I allow it to fully appear on top of all the controls in the form.
I have never used the tag property but while reviewing some design stuff it occurred to me that maybe I am overlooking it's usefulness and was wondering how some of you may have used it...?
Please pardon my ignorance, but how do I set up a ActiveX calendar in Access? The help files are missing from the version of Access 2000 I am using, and I really don't know what I am doing. I would be grateful for any help with this.
I have a txtBox. Its backColor property changes according to what I do on the form. Now, when I close the form and reopen it, the backColor is not the same one with which the form was closed.
Ex. red, green if I close the form having the backColor = green, then when I reopen it, it changes to red.
How do I set the Required property for field that already exists via SQL. I'm thinking along the lines of: ALTER TABLE table1 ALTER COLUMN field1 text(50) NOT REQUIRED.
I'd like to create a table with 240 fields. I know that the max is 255, however, I'm getting a message "property value too large" after I've created 114. Any ideas? All the number fields are byte size. Thanks!
I guess I have too many columns in my database and I'm getting the error message "Property value is too large" when trying to open the database table. When I was using Access 2000, I was still able to open the database but using Access 2003, the database will not open. Is there a way around this so I can open the table to fix it?
What I'd like to do is for my combo boxes to say something like "Select One" when the form is first loaded, until the user opens the box and selects something. My combo boxes work fine now, but they are currently empty when the form loads.
From my google research it appeared that the OnLoad property would probably help me do what I want, but I can't seem to find this property anywhere in Access. It's not anywhere in the property window and the help search doesn't return any results.
I'm using Access 2003 from MS Office Professional Edition 2003.
Am I missing an upgrade or does my version not have this property, or am I just missing it?
I have a lstbox on a bound form. the lstbox is based on a query. I want the first item in the box to be selected. This is what ive used:
Private Sub roll_class_select_AfterUpdate() DoCmd.Requery "lststudents" Me.lststudents.Selected(0) = True End Sub
But then the form gets stuck. None of the other controls will work. The first list item is selected but it then wants to be the centre of attention and everything else can bugger off.
When I attempt to run my results page with paging I get the following error:
ADODB.Recordset error '800a0cb3' Object or provider is not capable of performing requested operation. /slug/revslug/Administrators/AdminReports/Timesheet/TechnicianAllocation.asp, line 185
I have included a few key lines of code: Code:strDBPath = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & Server.Mappath("/slug/RevSLUG/DB/TimesheetDB.mdb") & ";"if strTechName = "All" Then strSQL = "Select " & cstr(strReportType) & ", SUM(Hours) as SumOfHours FROM Results WHERE (PerDate >= #" & cdate(strStartDate) & "# and PerDate <= #" & cdate(strEndDate) & "#) GROUP BY " & cstr(strReportType) &";"ElsestrSQL = "Select " & cstr(strReportType) & ", SUM(Hours) as SumOfHours FROM Results WHERE (PerDate >= #" & cdate(strStartDate) & "# and PerDate <= #" & cdate(strEndDate) & "# and TechName = '" & cstr(strtechname) & "') GROUP BY " & cstr(strReportType) &";"End IfSet rstSearch = Server.CreateObject("ADODB.Recordset")rstSearch.PageSize = PAGE_SIZErstSearch.CacheSize = PAGE_SIZE' Open our recordsetrstSearch.Open strSQL,strdbpathiRecordCount = rstSearch.RecordCountiPageCount = rstSearch.PageCount' Move to the page we need to show.rstSearch.AbsolutePage = iPageCurrent'this is line that contains the error(line 185)
How can I fix this problem...I think it has to do with the settings when I open the DB but I don't know what the settings should be to make it work correctly.
I have a subform (subform1) which allows me to select a value which then dictates which record is shown in the other subform (subform2). I want to run a macro every time subform2 has a different value -- without me having to click anywhere in subform2. I have tried to attach the macro to every place I can think of and it just doesn't seem to run. I am thinking it is because subform2 isn't receiving the focus. How do I give subform2 the focus and which event property should I be trying for?
Is there a way to change the background color of an field that has enable = off from the default "gray"? I can set it to transparent but I can't change the font color to see the data clearly.
Just trying to make the form "nice looking" to the user.