Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS ACCESS & have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for

Sponsored Links:

Related Messages:
Pull Data From Previous Record In Tabular Form
I have a form (frmMain) with a tabular subform (frmSub). The forms are related by a field (txtName) on the main form and (fkName) on the subform.
The subform contains a field (ErrOrd). I need to pull the ErrOrd from the last record input on the subform to use on the main form.

Any help is greatly appreciated.

View Replies !   View Related
Calculation On Previous Record
Hi, I'm wondering if anyone can help me with this query. I've had a look at some of the previous posts under previous record, but don't seem to be able to get to the bottom of it:

I have a set of data on employees who have all had one or more financial searches done on them and I want to return a field based on the previous record of that employee.

My data is as follows

Search ID----Employee ID-----Search Result


I would like an extra field that looks at the previous row, decides whether or not the previous row is the same employee id and if it is returns "Same" and if it isn't returns "Different"


View Replies !   View Related
Query To Pull First & Last Record?
I am having trouble. I have a log table and I am trying to pull two records at once. The records im trying to pull is the most recent record update as well as the original record.


I want to pull for Toysrus the first log intry for this company when I first put the record in. And I want to pull the most recent update that I did for this company. Is there a way to pull both records at the same time? The first and the last?

Any help would be appreciated. THANK YOU SO MUCH!!!!!

View Replies !   View Related
Refer To Previous Record In Current Record Query
In my query, i want to automatically display the value of another field from the previous record in a field in my current record. i.e.

Name Value Previous
Record 1 1
Record 2 2 1
Record 3 7 2
Record 4 1 7

Is it possible to create some kind of simple expression to refer to data in another record?


View Replies !   View Related
Query Data From Previous Record
I currently have a form [frmE_PMSA] that has fields dtmDate, intHoursWorked, intHoursToGo, intWeeks, intHoursWeek.

On my form I would like to set up another field that is bound to the table that will upon clicking it, retrieve the data from the previous record [intHoursWeek] and run a calculation against the current records intHoursWorked.


dtmDate / intHoursWorked / intHoursToGo / intWeeks / intHoursWeek
05/23/05 / 400 / 10000 / 10 / 1000
05/30/05 / 500 / 9500 / 9  / 1056

On my form, I would be showing the most recent data entry for the week of 05/30/05. What I would like to do is have a form field that upon clicking it, will calculate the percent efficiency for that weeks worked performed. In this case the calculation would be:

Efficiency = intHoursWorked(current Record "05/30/05") / intHoursWeek (Previous Record)
Efficiency = 500/1000

If someone can help with this I would appreciate it. Thanks!

View Replies !   View Related
Compare Current To Previous Record In Query
I have a table of customers who report trouble on their equipment. I would like to compare the date in the current record to the previous record to see if it occurred within 30 days. Can I do this with an SQL query or expression?

View Replies !   View Related
Running Calculation Based On Previous Transactions
I am building an application for a small clinic. In the interests of good database design, I don't want to be storing numbers that are derived by calculation.

A patient with insurance will have a deductable that will be entered into a field on their first (ms access) transaction form.

A calculation will put the remaining deductable into another field. No problem.
However, the NEXT visit has to look back to find previous transaction records, again perform the initial calculation and then perform another for this transaction, and again the next time and the next until the deductable reaches zero.

Additionally, since I'm not storing these values, if I pull up an old transaction form, that form has to re-perform the calculation ONLY on transactions from that date and earlier. It must not reflect visits that took place later.

So, this field must query tblTransactions, filtered by the name of the patient (a combo box called tblTransactions.Patient_Name that looks at tblContacts), the transaction date/time (stored in two date/time fields, cleverly named tblTransactions.Date and tblTransactions.Time), and the total deductable value stored in a field called tblTransactions.Deductable.

As someone who has never coded anything more complicated than DOS batch files, I'm at somewhat of a loss as to how to go about this.

Any assistance, code-wise and which Property value to put it in would be MOST appreciated.

View Replies !   View Related
Using A String To Pull Up A Record On A Form
Sorry if this has been asked before but I have searched and couldn't find an answer

I have a string that is set on startup (username) and have another form(hidden) that loads on startup this form contains information on what forms and options the user can access. Just having a little trouble using the string to pull the correct record, the information in the string would be from the primary key field on the table.



View Replies !   View Related
Dynamically Update Field Of A Current Record Based On Previous Record
I need a way to dynamically store a particular value in "field_2" of the CURRENT record depending on whether or not the value of "field_1" of the CURRENT record is identical to the value of "field_1" of the PREVIOUS record within the same table. The table is sorted on "field_1".

So, if the value of "field_1" in the CURRENT record is "ABC" and the value of "field_1" in the PREVIOUS record is also "ABC", then store a value of "PPP" in "field_2" of the current record. IF on the other hand, the value of "field_1" in the CURRENT record is "ABC" and the value of "field_1" in the PREVIOUS record is "XYZ", then store a value of "WWW" in "field_2" of the current record.

I have a report that will use these results to count only the number of records that have a "WWW" in "field_2".

Is this doable, maybe in a query somehow?

I should add that whatever the solution, it needs to be compatible with Access 2000.

View Replies !   View Related
Pull Info From One Text Box Forward To New Record
Looking for an automation solution
currently I have a database for client progress and prescriptions. when the file is opened it is set for data entry so that a clean note form is opened. I have a button that pulls up past notes for their review.
it has been requested that there be a way to pull the last narative field forward to the new record for editing as a number of the features of the narative remain the same.
Currently the only way is for them to open the last seen note hightlight the field and past into the new note. to high level for some of them.
Need to make this an automated feature where they would just click on a button and the process would all occur behind the scean and the note would apper in the new note narative box.
I know that I could tell the form to not be for data entry but then they write over the last note. this needs to be a new record.
Any suggestions greatly appreciated

View Replies !   View Related
Last Name Input Form Doesn't Pull Pertinent Record
I'm a complete newbie at Access. A friend (she's the Secretary of our small town's Service District Board of Trustees) asked me to develop a database for keeping records of property owners here, to facilitate such things as sending the yearly fee letter, tracking mailing addresses and property addresses, whether the fee is paid, etc.

I figured out most of it by "taking apart" a database she uses for another organization. It wasn't easy, but it's all working EXCEPT the thing she uses most: a last name input form (a combo box entry field with a command button) which is supposed to bring up the appropriate "Edit Existing Owner" form by the last name entered (or give an error message if there's no owner by that name, of course). The form works - but simply brings up the last-entered record.

I've looked at the setup in the other database, I see that when I create this form relationship, the VB code is nowhere close to what's in the other database. Trying to use the code from the other database is ineffective, even though the relationship is exactly the same. I'd be happy to have someone look at the forms etc. but the database compressed to a .rar file is 818k which is pretty big - and I'm not sure how to provide just the parts which aren't working.

I can upload the database to webspace and direct someone there if they'd be willing to take a look....

Thanks for any help!

View Replies !   View Related
Previous Record Value
Is there a way I can grab the previous record's value without using dlookup? I am trying to create a running total in a datasheet view. e.g.

Date Credit Debit Run. Tot.
6/1/06 $25 $0 $25
6/4/06 $30 $0 $55
6/9/06 $0 $50 $5

I could do it by using an autonumber but the data is sorted by date and not by the order in which it was entered. Suggestions? :o

View Replies !   View Related
Previous Record
I have an inventory report that I am given among the fields are
Item, Ship Date, Signed Quantity, Filled-Recvd, On Hand
I am given an initial amount in the onhand field but the fields below that for that item are blank.
What I would like to do is [Signed Quantity] - [Filled-Recvd] and then add that to the On Hand from the previous record and place it in the on hand field..

If it were in excel I would say G2 – H2 + I1
G = Signed Quantity
H = Filled-Recvd
I = On Hand

View Replies !   View Related
How To Subtract Previous Record From Record
I have a Motorhome which I want to check it's Fuel Economy, seems simple!
I record the odomiter readingwhen I fill up with petrol and the amount of petrol pumped in to fill tank and the cost
I have done it in Excel 97 but I would like to convert to an Access 97 Database.
The purpose is to open an Access Form, add a record with Three Fields, namely the odomiter reading, Amount of Fuel pumped into tank, and Cost.
I would then like Access to subtract the previous record's odomiter reading from the new odomiter reading to obtain the distance traveled since last fill and using this number and the other 2 fields I can calculate my fuel economy
I tried to attached the Excel (97) spreadsheet for your information but it was too large for this forum
The calculations are based on Australian Dollars, LPGas and Litres but it would make no differance if it were Gallons, US Dollars etc.
I would very much appriciate a note to tell me if anyone is able to assist me with this problem.
Thank You
Paul Leaver
Queensland Australia

View Replies !   View Related
Pull Down Menu In Query
I would like to build a query and ask it to choose a boat name out of a list of pre set names. When the pop up box appears to type the name, i would like it to be a combo box where the name can be pulled from the list. can this be done? thanks in advance.

- Andre'

View Replies !   View Related
Pull Down Query List
I was wondering was it possible to have my queries in a pull down list and I hit a button and the query/report is ran? Or do I have to stay with about 6 or 7 buttons on a form?

I know it sounds crazy.....

View Replies !   View Related
Previous Record As Default Value?
Is it possible for me to specify the default value in a table as what was inputed in the previous record?

View Replies !   View Related
Using Data From Previous Record
I'm a novice with Access but I thought I would use Access rather than Excel to record fuel use for our vehicles because the reporting functions should be more powerful.

I have set up a table where I input date, vehicle, member of staff, mileage of the vehicle and the cumulative reading from the fuel tank meter. I thought it should be simple enough to calculate the fuel used each fill by taking the meter reading away from the reading on the previous record, but I cannot find a way of getting Access to do this.

I am missing something obvious or not?



View Replies !   View Related
Default From Previous Record
Im wanting to set a default text from a previous record.
I have a fields that has Start location and Finish location,
Im wanting to set a defaulf so that the Finish location from the previous record is defaulted to the Start location of the next.
Is this possible????
Please help.

View Replies !   View Related
How To Calculate The Previous Age Of A Record
:confused: I am trying write a select query to find the past age of the records based on a dated field "consigned date" and select only those records over 10 days old. I would like the user to input the date in time that will be used for the calculation reference. When I try this Access tells me the function is too complex. The query works when I change the user selected date with "date()" but this only give me the current age of the record not the age it was at a previous date. I would like to sum all record older than 10 days old from a user inputted date. Can someone please help I have exhausted my Access capabilities.

My code looks like below:

Records over 10 days: Sum(IIf([user input date]-[Consigned Date]>=10,1,0))

This one give me the current age.
Records over 10 days: Sum(IIf(date()-[Consigned Date]>=10,1,0))

View Replies !   View Related
Previous / Next Record Code
Ive added my own navigation buttons as I needed to add some code to them, but when a user gets to the first / last records & presses previous / next record, they get an error message 'cannot go to the specified record' and have to close & reopen the form.
It's prob. quite simple, but how do I get round this please?

View Replies !   View Related
Field Value Same As Previous Record
When I click my command button that says, "New Record", I want it to go to go to a new record and populate the field "Town" with the value in the previous record.

e.g. ClientID on last record is 150 and has Town="London". Click "New Record". New record created. Town field on ClientID 151 has Town="London".

How can I do this?



View Replies !   View Related
Previous Record Fields
Hi there, I'm trying to make a form which calculates the annual depreciation value of a property. I have tried using the PrevRecVal function and I even made the following query:

SELECT Last(PropertyDepreciation.[Total]) FROM PropertyDepreciation WHERE (((PropertyDepreciation.PropertyID)=(Forms!Propert yDepreciationSF!PropertyID)) And ((PropertyDepreciation.PDID)=((Forms!PropertyDepre ciationSF!PDID)-1)));

But still no luck. I made a text field called PreviousTotalValue to see what sort of information was being returned by the query and PrevRecVal and for both, #Name? is returned.
Any ideas fellas?

View Replies !   View Related
Data From Previous Record
I have still not solved the problem wich is doing my head in!!!
In the following DB I have the "frm1" wich the value of the first record for "Value1" is 10 when I pass to the second record Iwould like to show automatically the value 10 in the field "Value1" this for all the records untill I change toa new value so from then on it will show the new value.
I believe is the Dlookup function, but I have not find the way to make it work.
I must be thick but I need your help!!!!!

View Replies !   View Related
Previous Record In Form
Is there way to have one or more of the fields in my form filled with information from the previous record? For example - If I am taking a gas pump reading at night and I want the form to subtract the start (last nights reading) from tonights reading to calculate total gallons sold for the day

or similarly I want to make a form to take starting cash, add sales, subtract payouts and deposits and come up with what ending cash should be... Do I have to put starting cash in manually each day or can I have it autofill from the previous record?

View Replies !   View Related
Moving To Previous Record
Can anyone tell me how do i move to the previous record in the database using asp. i have tried the following
hint's will also help

View Replies !   View Related
Query To Pull Past 3 Months
I have a query that I need to always pull data from the newest past 3 months, so if this query were ran today it would take from months 2,3,4 (Feb, Mar, Apr). Any clue on how to do this?

View Replies !   View Related
Eliminating Duplicates From A Query Pull

I am building a query that pulls from one databases but I am running into duplicates.

Here is the skinny:

From the [tbl_databases], I am setting criteria that restricts a column containing “Visio”, more specifically, “Not Like “*Visio*”. I am also setting criteria that restricts a column containing “OLD” (it is a Yes/No field).


The problem is that there are duplicate rows that contain both “Visio” and “Old. So, simply suing my criteria restriction are pulling out the Visio and Visio/Old orders as well as Old and Old/Visio order.

Can I create a subquery that contain the combination of “Visio” and “Old” to restrict the subset from being extracted twice?

I think I have the logic but not sure not to set it up.



View Replies !   View Related
Query Updates Pull Down Menu
I have a table with the following 2 fields: Make and Model.
When I am in data sheet view I have Make set up as a pull down menu with the various distinct options (i.e. Ford, Chevy, Toyota, etc.). I would like to set up the table so that when I click on Ford, for instance, it will query a different table (carclass) and output only the Ford vehicles on a drop down menu for the Make field to choose from. (i.e. Mustang, Freestar, Focus, etc.)
For Model, I have the following code for the Row Source:

select model from carclass where make=make(from the user input of the make).

Any help or suggestions would be greatly appreciated.
Thank you in advance for your assistance.

View Replies !   View Related
How Do I Pull Subform Data To A Query?

I have a form with a subform. I have the subform running a update query on a command button in the subform. The subform has the textboxes and I cant seem to get the query to pull the data from those textboxes. I have used the normal [forms]![form_name]![textbox_name] in the past but everything I try to pull the subform textbox data is not working.

I have tried

Nothing works. What is the correct syntax for this? Any help would be great !!! Thank you in advance.


View Replies !   View Related

Copyright © 2005-08, All rights reserved