Hi Everyone,
I was wondering if anybody would be kind enough to help me with a problem that I have with regards to a 'Contacts Database' that I found under the Sample Database link on this site - posted by MStCyr. When I try to navigate through A-Z buttons I am presented with a dialogue box which states " the object doesn't contain the Automation object 'RecordsetClone', whatever that means??
I would like to use this sample DB in my project however it is presently unusable unless I can figure out how to clear this problem. If this is not achievable could you please point me in the right direction where I could find a similar, downloadable file.
Hopefully a more experienced forum member than I could please help me out.........
I have some extensive experience with databases and even Access when used as a datastore but I have never written an app with Access as the front end so i'm very much a newbie. I am doing a friend a favor and fixing his Access app which someone created for him and he needed to add a field to it. I am hoping some of you Access Experts can help. We added the field and everything seemed to be working fine except know the main form for looking up and editing users seems to be broken. The main form is tied to a query which basically returns all the records in a table in last name order. The lookup is accomplished via an unbounded combo box. The AfterUpdate event for that combo box is below. I have added some troublshooting code to the sub below. The problem is that after the "Set rs = Me.Recordset.Clone" line, the recordset is empty. I checked by using a message box to return the recordcount. Once it gets to the "Me.Bookmark = rs.Bookmark" I get "Run Time Error '3021' No Current Record"
Any help anyone can give would be greatly appreciated.
--------BEGIN CODE SNIPPET------------- Private Sub Combo81_AfterUpdate() ' Find the record that matches the control. Dim rs As Object
Set rs = Me.Recordset.Clone MsgBox ("RecordCount: " & rs.RecordCount)
'testing debug MsgBox ("Member ID Searched: " & Me![Combo81])
rs.FindFirst "[tblMembers.MemberID] = " & Str(Me![Combo81]) Me.Bookmark = rs.Bookmark End Sub --------END CODE SNIPPET-------------
I have a form with a continuous subform whose RecordSource is a predefined query. There are a number of controls on the main form which allow for various filtering on the subform / query and a command button to export the data to Excel.Because I want to export exactly whatever the user has filtered using the form, I take a clone of the subform recordset and pass that as a recordset object to my export function.
I've just noticed, however, that a couple of the fields in the Excel spreadsheet are always blank, even though the corresponding records on the subform show values? I can't figure out why; there is nothing unusual or distinctive about these fields (2 x Text and 1 x Date/Time) other than the fact that the contents don't seem to copy? I do get the field names - just no data for them?
The data is visible in the subform, and when I run the query on its own, the fields are populated in the returned dataset as well? So why aren't they included in the RecordsetClone?
I am trying to create an attendance application for my group of 6people, does anyone have or know where i can find any to look at. I don't even know where to begin.
Daily in and out. Keeping tabs of our vacation days/sick days. I just need to know where to begin, or need a sample for ideas in creating this. I have looked high and low. Please show me/tell me if you have any or how you did it, if you have done it before. Thanks friends!
I posted this here but didn't get any response. http://access-programmers.co.uk/forums/showthread.php?t=114099
I'm in over my head with something I've been asked to do at work as my access skills are pretty basic.
I need a sample database containing PRODUCTS and SUPPLIERS, that lets you book IN stock received from the supplier (and adds to the stock level) and lets you book OUT stock issued to staff (and reduces the stock level)
I'll have a go at reorder levels, form design, stuff like that myself, but I'm having trouble with these very basic requirements.
Does anyone know of a sample database that I can download to learn some of this from?
I finally got TreeView to work, by downloading the example database from this (http://www.access-programmers.co.uk/forums/showthread.php?t=80805&highlight=treeview) thread. I haven't had as much luck with ListView, though. Does anyone have a database they could post that has a working listview? I'd greatly appreciate it!!
I'm still working on this supplier database for my boss and the supplier filter section is still causing me problems.
Let me set the scene for you....
I have a form with 3 combo boxes on it. These are cboProg, cboPPS & cboSupplier.
I need to get the combo's working so that when you select a programme from cboProg it filters the list in cboPPS (Primary Product or Service) to show only products and/or services that are used on that programme. In turn I need to make it so that when you select one of these Primary Product or Service's from cboPPS it filters the list of suppliers in cboSupplier to show only suppliers that provide that product or service.
Essentially, I have a HUGE list of suppliers that I want to filter down to suppliers that work on a programme providing a particular product or service using the combo boxes in the order shown below.
Programme (cboProg) --(filters)--> Primary Product or Service (cboPPS) --(filters)--> Supplier (cboSupplier)
When I have filtered the list of suppliers down to a list that worked on programme X, providing product or service Y, I'd like to make it so that you can just double click on that suppliers name to open their details.
I've based my previous efforts on a sample database called dbcombos that I found on this forum (I've attached it to this post). The only problem with this database is that it’s 2 sets of 2 tiered combo boxes on the same form and not a 4 tiered set of combo boxes as I originally thought.
I am experiencing a problem with the mousetrap sample after I secured my database.
When I save on my main form and I try to go to my subform I keep getting the "Please Save this Record! You can not advance to another record until you either 'Save' the changes made to this record or 'Undo' your changed."
I have saved but it is still preventing me from going to the my subform. I numbered the Save Required msgs so that I know which one I am getting and I am getting the one from:
Private Sub Form_BeforeUpdate(Cancel As Integer) On Error GoTo Err_Form_BeforeUpdate
Me.tbHidden.SetFocus
If Me.tbProperSave.Value = "No" Then Beep MsgBox "Please Save This Record!" & vbCrLf & vbLf & "You can not advance to another record until you either 'Save' the changes made to this record or 'Undo' your changes.7", vbExclamation, "Save Required" DoCmd.CancelEvent Exit Sub End If
Exit_Form_BeforeUpdate: Exit Sub
Err_Form_BeforeUpdate: If Err = 3020 Then 'Update or CancelUpdate without AddNew or Edit Exit Sub Else MsgBox Err.Number, Err.Description Resume Exit_Form_BeforeUpdate End If
End Sub
Above it is checking if tbProperSave.Value = "No" and in bSave you have Case vbYes: 'Save the changes Me.tbProperSave.Value = "Yes" DoCmd.RunCommand acCmdSaveRecord Me.tbProperSave.Value = "No"
So it's setting the value to no again?
I know it's not a permissions thing because I am admin and have full permissions on the forms.
I am trying to add extra validation in a sample db (done in A97 (converted to A2003)see attached.
I am attempting the following: Please not that the db has existing validation which I would like to keep (or change if advised) ...
Conditions: 1. Input into field "ID" must start with the letter P or p or R or r 2. If field "ID" starts with the letter P or p and field "Code" starts with the letter R or r, then a message stating that this combination is invalid should appear 3. If field "ID" starts with the letter R or r and field "Code" starts with the letter P or p, then a message stating that this combination is invalid should appear.
I would like to make some changes to the Northwind sample database.I need to have the Customers section completely removed as my company issues products to our own staff, not to external customers, so there is no Customers and shipping details needed.
Hi, I have a problem with form design, I want a form like in Northwind sample database: Summary of Sales by Year Report. It use Sorting and Grouping for Footer that I can't find it in Form design. Is it any other way to do it in Form design so I can get the same result like in Report design?. The reason why I want it, because I want to control the size. thankyou in advance for your help.
Hello to all, What is the simplest way to create an empty table with the same characteristics (same fields number/names/properties) as an existing table and how to rename / delete a table ? I have a table (A) with autonumber primary key, with vba code i want to copy it in an other table (B) then i want to delete (A) and rename (B) to (A) all this to renumber autonumber primary key. Each time i open the form and quit it without enter data i lost a number so sometimes i want to re-organize the table to renumber and compress autonumber. Thanks in advance for help. VINCENT
We use an Access 97 database over our network. We need to put it on additional PCs, but do not have current licenses for this.
Is there an Access 97 clone that we could use? It wuld simply need to serve as the Front-End of the database and be able to connect safely to the MS Access 97 Back-End.
I am having this error which is driving me nuts but I am sure it is quite a simple one. I am attaching a Sample dbase - My command runs of a Form based on a Table. Any help??
I added a command button to a form that will create a new record and keep certain fields from the previously saved record. Whenever I open the form from the database window and enter in a new record, then click the command button to move to a new record it works fine; however, when I access the form through the Switchboard and try to use the command button it gives me a "You can't go to the specified record. You may be at the end of a recordset." error.
Does anyone know what I need to do to correct this problem?
Hi I am assigning a value from a table to text box on the form through VBA. It gives the following error :
Run time error 2115
The macro or function set to the BeforeUpdate or ValidationRule property for this field is preventing MS Access from saving the data in the field. I have no BeforeUpdate or Validation event for the text box. What else could be the cause ?
The text box is unbound and I use ADODB connection. Please assist.
Why does the following code generate an error. All i want to do is open a recordset which I thought would be straightforward. (novice Programmer, new to access vba). The set statement in the ComboProduct event generates the error.
Option Compare Database Dim Company As String Private dbaProposal As DAO.Database Dim EffectiveDate As Date Dim Product As String Private rstProposal As DAO.Recordset
Private Sub ComboProduct_AfterUpdate() Product = ComboProduct.Value Set rstProposal = dbsProposal.OpenRecordset("SELECT * FROM Proposals WHERE Proposals.[Group Name]='" & Company & "' AND Proposals.[Effective Date]=#" & EffectiveDate & "# AND Proposals.Product='" & Product & "'") End Sub
Private Sub Form_Load() Set dbsProposal = DBEngine.OpenDatabase("Database1.accdb") End Sub
Overview: Ok so i have document database, and i have a number of forms these forms have a tab control layout on them. There is a 'Search' tab, a 'Add' tab, and a 'Edit' tab. Now what i have is a edit log table linked with the documents table on two seperate subforms on the 'Search' page. They are linked by the 'Document Number' which is not the primary key. The 'Add' page is linked to the document subform and the 'Edit' page is linked to the Log subform.
Aim: My aim is to have a changes log for each document so that when i select a document in the document subform that the all the changes made to that document are shown on the log subform.
Problem: When i open the 'Search' tab there are somtimes more than one record with the same 'document number' in the log subform. This is normal as users may update the same document more than once causing there to be 2 or more of the same document number listed under the log subform; but... this also causes the document subform to display a duplicate of the document with that 'document number'.
Proposed Solution: I dont know if there is a way but i was wondering if there is a piece of code that will automaticly hide any records that have the same document number on the document subform. Or if there is a better way please tell me.
Thanks for taking the time to read this, i hope i havent wasted your time by asking a simple and stupid question.
How it works: You search for a User, and then you search for a Serial.Now, what if I want to edit the table? (inside the subform, the results). I added an openRecordSet, and Parameters, but I still get the error saying that Recordset cannot be updated.Why? I opened and sent parameters but still fails.