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-------------
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 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?
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.
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.
Special situation: The SQL Server Linked Server across the country is linked to a Read Only Oracle DB. This data pull works perfectly and populates the Subform.
The problem is that Oracle can take 3 to 6 seconds to retrieve the single record depending on the network traffic through a small pipe.
The code below shows the RecordSource for the SubForm. clicking on a list box supplies the value. Then 3 to 6 seconds later, the subform populates.
The actual Recordset for this Recordsource is needed to conduct Validation on each field. Normally this would be on SQL Server, I might just create a Recordset Oject and run this SQL statement again in 1 milisecond. In this case, it will probably take an additional 3 to 6 seconds. Avoiding another lengthy round-trip to Oracle would be prefered.
Goal: How does one grab, clone, or other wise reference the existing recordset for the SubForm?
Note: Immediate Window - One single field can be returned quickly
There are 48 fields that need validation - is there a way to reference the entire recordset?
Immediate Window during Break Mode: ? me.fsubsrNavSHLBHL("NavSH_QQ") NESE ' this is the correct value for the current recordsource
Set a breakpoint right after the line: fsubsrNavSHLBHL.Form.RecordSource = "Select * from vsrNavigatorSHLBHL where Well_ID =" & txtNavWellID.Value
Immediate Window: ? me.fsubsrNavSHLBHL.Form.RecordSource Select * from vsrNavigatorSHLBHL where Well_ID =91229
Hi guys, I'm a bit confused: I know that opening a bound form will bring down the whole recordset. But if I create a parametered query as the recordsource, will it still bring down the whole recordset first and only afterwards cut down to the records matching the parameters?
Example: I have a clients table with 5000 clients on a backend mdb, and my client lookup form in my frontend mdb. If I open the form looking for just client "Jim Jones" (via the parameter query), will Access bring down all 5000 clients from the backend to my frontend first, and only then seek out "Jim Jones" before discarding the rest of the recordset?
For if this is true then this whole Access business is rather unsuited for networks, even a small one. I hope you guys prove me wrong.
I want to write a email where there are 2 or 3 different ordernumbers for same email, i want to include the email in the mail part as single column table. how to do it? also can i use result of one recordset for other recordset?
from a table with fields userID and Date (in which any userID has multiple records with different Date values, and other fields) i have built a select query based on Date = one specific value. can anyone give an explanation (for beginners), through a sample code, that expands the query recordset so that the new recordset includes all records per userID that qualified in the prior recordset? below is an example. thank you!
Table with records: userID / Date u1 / d1 u1 / d2 u2 / d1 u2 / d2 u3 / d2 ... 1st Select Query (where Date = d1): u1 / d1 u2 / d1
Desired 2nd Query based off 1st Query (where ?): u1 / d1 u1 / d2 u2 / d1 u2 / d2
I have two tables that have the exact same fields. In table1 I have records that need to be UPDATED into table2. I tried an Update query and out of 600 records only half of those got updated. In my update query I joined tbl1 and tbl2 by Location (LOC) I checked for Nulls, Blanks, spaces, you name it. I can't figure why they all didn't get updated. I created a SQL query and go the exact same results. Ideally, I would like to create something in VBA to do this. I do not have any forms linked to these tables. In all I have about 600 records and 15 different fields that need to be updated. My example is only for one field.
sql example below. Which is the Access Sql in the Query
Here's the situation. I have a Database in Excel (~3000 rows & 7 Columns)
The first Column has numbers like this (3-10-34 or 223-7-45) the other columns have names, addresses and other stuff.
What I'm trying to do is to eliminate the use of huge binders. I want to have a Blank screen with only one input box where I can type a number and retrieve a specific row from my Database. Time saving.
Now, when I'm searching, I usually only have the first numbers before the dash (such as the 3 or the 223) not the other numbers. So I cannot input 3-10-34 for instance. I can only put 3...:confused:
I've already imported it to Access and it works fine but have no idea how to do what I just described!
sorry if this question is answered somewhere else i did check through the forum a bit first
anyway to the question
is there a way in access 2003 so when i change a value in one table it creates a new record in another table
example
i have a table called tickets and one called fixes, when i change a value in a record in the tickets table i want a new record in the fixes table to be created for me
I am not sure if i am supposed to post in this section......
--------------------------------
Using Access 2003.
I am very new to Access and have started off very well building my first project..
My help is that i would like a macro button to delete a record once you have put in to the database if that is possible also i would like a save button if that is possible...
I have put a Tab Contol on and want to change the backgound but i can't see on the properties box to change this. Is there a piece of code that allow me to do so...
I am still very new to Access 2003 and have started off very well..
Just a few help please:
Help 1. I need a macro button that will allow me to delete a record from the database via a form.
Help 2. I need a macro button to save the database if that is possible via a form.
Help 3. I have a Tab Control on my form and i want to change the background of the Tab Control but can't find it on the properties is there a piece of code i can put in to VB which will do this for me or is there another way.
hello guys i m very new to access and i need some help! if i had a form that contains a field like salary and i need to add all the salaries from all the records into one total salary how can i do it? plz take into consideration that i m totally new and dumb:p in access thank you
Alright here is what I am trying to accomplish. I have A, and B. Then I have 6 different tables that relate to the six different things B could be and contain all sorts of other information.
What I want is to make a form that lets you type in A, and B. Then the correct table/form for the respective B will pop in to the subform area. Then as soon as you select or type in a new A and B, the subform will change, or stay the same if the B has not changed, but a new record will have started.
"A" is just an ID... something like AA001, AA002, etc. "B" is the stage each ID is at... like beginning, middle, end, etc.
Sorry if it is a bit confusing, I am willing to explain any details that could help. I consider myself a somewhat advanced Access user, but this just stumps me for some reason.
Im looking to create a frontend and backend for a Dojo (Martial arts center). Basically, it will log in people(record their training time, by day not hour) either by Number or name. Secondly, I want to be able to have all these fields seen by the admin: Dojo Number Date Joined Last Name First Name Male/Female Address City Zip Home Phone Work Phone E-mail Birthday Occupation Adult/teen/child Rank Active/ Inactive status Martial Art Exp. Staff Y/N ASNJ Dues Info USAF Dues Info USAF Membership Number Misc. Notes
So the backend/ admin would be able to update this field and keep records up to date.
There would be around 800 entries/people, and only one admin accessing the db at any time. The frontend would be used to log in..
Can some kind soul help with pointing me in the right direction to a problem below?
In my database (property database), I have some old properties which are now sold. There are relationships between property, rent received, billing, lessees, etc. I want to be able to keep the details of the 'sold' properties.(i.e., who owned it, what they paid in the past, when they paid etc. in case I need it, but don't want it shown any longer on the main working database). I want to be able to delete the properties that are sold from the main table. Any ideas how I go about this? Hope I've explained myself ok.
I have recently created a database which exports a daily report in Excel. The problem I am having is that the reports are sent out in Excel 95 which cannot be opened by Blackberry. We used to create this report from an excel database and send it out but it went out in excel 97 format which was readable. As a complete "Access" novice I am at a loss on how to cure this problem short of copying the excel 95 report which we create automatically and cutting and pasting into excel 97. Over to the experts.
Very much a novice here What im trying to accomplish is so simple its silly, but i cant figure it out for the life of me I have a field id like to restrict entries to the words Buyer and Seller, and i'd like it so that in the form, if the user hits the letter B, Buyer fills in and if S seller fills in ... What can i do in the table to accomplish this? Thanks so much
Hi, I have used access in the past but very little. I need help setting up a table that I can make relationships to another table. Here's what I need.
I need a table(s) that I can log samples of medications into. It needs to have a drug name, dose, lot #, expiration date, and #of samples. As we get samples, these will be logged into here via a form made from the table (I've already done this exactly as stated). I will need to be able to get a total from the number of a certain dose of medication i.e. amoxicillin 500mg (all of the lot numbers added together).
Now, another table(s) needs to have samples signed out. It needs to include pt. name (first and last), date, drug, dose, lot #, exp. date, #of samples, ordering practitioner, and clinic. What I want to happen is when I sign out the Amox 500mg #30 with a specific lot #, it will remove the number from that specific lot # in the inventory table and reduce the number of Amox 500 total (all lot #s).
Does this sound too complicated. I tried to set up one table for the sign out process, but suspect it's too many variables. The primary key I was thinking would be the lot # but i need to be able to use it more than once if I get 100 samples and only use 30 at a time.
Would someone be willing to offer some advice!!!?? Thanks, Robin.
I made a simple Table with a couple of fields.Each record shows what a job needs to be done ...Now I'd like to add simple checkbox and each time I would check this box (that would mean that job has been done) Access would automatically delete or hide that record.
Thank you
Also could you point me to good tutorials?Thanks a lot
I've created a simple access database for my deparment, that I want other departments to be able to query data from. I don't want them to have to open the entire database each time they pull data, because I'm afraid they'd become confused by the program.
The company seems much more comfortable with excel files, and I've been trying to use an Excel-based query to display selected information. The problem is this: Nobody can update their excel queries, because only my department has full access to the .mdb file that the data is stored in. Everyone else has read-only access to the file and the folder it's located in, so they are unable to run an update.
Is there a good workaround for this? I feel like I'm overlooking something incredibly simple.
Ideally, I'd like to create an .xls file with the necessary queries in it, and then just email that file around, allowing other users to just save the file to their desktop and open it/update it when they need to check on something. Other methods of accomplishing the same thing are welcome too, but that's what I'm going for right now.