Count Record On A Continuous Form That Summarizes Groups Primary Value

Apr 7, 2014

I have a continuous form that shows all the available lease numbers for a client. Each lease number has a monthly charge associated with it and has multiple cars associated with it. For example a client may have lease number 1, 2.5, and 3. Lease 1 may have 3 cars, lease 2 10 cars and lease 3 1 car.

I created a continuous form that shows each individual lease number for a client and the monthly charge. The form is based on a totals query where I use a count to get the total number of cars for the lease number. That all works fine and when i open the form it shows me all the lease numbers for the active client and the monthly charge like the table below.

Lease number
Monthly Charge
Total cars in lease
total value of lease
value left on lease

1
100
3
100x3=300

2.5
200
10
200x3=600

3
250
1
250x3=750

I am trying to do =Sum([CRevFromCustomer]*[CountOfLeaseNumber]) but it gives me the same value for all lease numbers. It gives me the total value of all the lease numbers for that client instead of showing me the total value each individual lease number. table below shows what I mean where 1650 is the total from the 3 different lease numbers and revenue added together.

Lease number
Monthly Charge
Total cars in lease
total value of lease
value left on lease

1
100
3
1650

2.5
200
10
1650

3
250
1
1650

View Replies


ADVERTISEMENT

Continuous Forms Record Count

Nov 13, 2006

I've only recently gotten to know about continuous forms and their use a bit. So for example, I used a maximum number of pre-defined (6) visits. I need to change that still, but during the development of the sales forms I already ran into a problem.

At first I was planning to have a certain maximum number of items to have on a form and create an invoice from that. But of course that would limit the number of items on one invoice which isn't good. So, now I have a continous form which adds a line containing productname, price, nr of that item etc. anytime needed.

In the previous design idea it would have been easy to calculate the total amount of money at the end of the list since the list was predefined. So I could just say invoiceamount = itemID1amount + itemID2amount + itemID3amout etc.
With the "new" design however that is impossible to do since the number of objects is unknown. So how do I create a piece of code which does that? In the continous form I have a SaleID which keeps track of which items belong to a certain Sale and a TotalItemsID autonumber which keeps track of the number of lines (items) which belong to that specific Sale.

So I need to count the total number of TotalItemsID's within a certain SaleID and then have a piece of code which creates a sum of that counted list of items.

I'm new at this, I've found the function Dcount() should be used to accomplish this, but the rest, as of yet, remains a mistery to me.

How to do this?

View 5 Replies View Related

Modules & VBA :: Highlight Record On Click Record Selector In Continuous Form

Oct 23, 2014

I would like to highlight record when user will click Record Selector in the continuous form. How to do it?

View 1 Replies View Related

Forms :: How To Get A Specific Record To Be First Record Of Continuous Form

Nov 8, 2013

I have a continuous form for which the recordsource is a query that retrieves dates from 10 days in the past to 10 days in the present. I want the record with today's date to be at the top of the form. The record with the oldest date is always on top. Is this a scrolling issue? How can I get the record with today's date to appear on top?

View 5 Replies View Related

Continuous Form Last Record

Mar 22, 2005

I have a continuous form, which is used as a sub form in a main form. How can i put some code on a control which will work only, if the focus is on the last record (the event i would like to use is onKeyDown). I have tried using:

if Me.CurrentRecord = acLast Then ....

but to no avail.

Any suggestions please ?

Thank You

View 6 Replies View Related

New Record At Top Of Continuous Form

Mar 2, 2006

Hi,

This is probably a stupid question and I expect the answer is no but here goes.

I have a continuous subform showing records sorted to show the latest first.

I would like the empty new record to be sitting at the top of the list rather than the bottom, so my users don't need to scroll down to enter a new record.

Is this possible, and if so what is the setting I need to use.

thanks

Sue

View 4 Replies View Related

Search For Particular Record On Continuous Form

May 16, 2005

I have a continuous form based on a query. In the form footer I have placed a text box and a command button. One of the text boxes on the continuous form is bound to the VIN field in the query. I would like the user to be able to place the last 8 digits of a particular VIN in the text box in the footer and click the command button to bring that particular record to the top.....

View 5 Replies View Related

Empty Record Appear First - Continuous Form

Jul 23, 2005

In a continuous form, I know you can groupby in descending order. If you do this on a date field, then the newest record appears at the top. How do I make the blank record for entering new records appear at the top of the form instead of the bottom. Thank you.

View 1 Replies View Related

How To Highlight A Record In A Continuous Form

Nov 11, 2005

Hello all,

This is my first post. I have been trying to find a solution for the following issue. I have a Continuous form and I would like to highlight the record by clicking on any of the fields in that record, tried everything with no luck, any ideas?

Thank you

View 4 Replies View Related

Delete Record On Continuous Form

Mar 2, 2006

I need to have a button on my continuous form that deletes the corresponding record... I used the wizard to create the button, but it doesn't seem to work...

Any Ideas?

View 4 Replies View Related

Continuous Form Record Sorting

Mar 17, 2005

I doubt this is possible, but I'll see if anyone out there knows how to do this...

so i have labor entries that consist of a laborID (the guy doing the labor) the serviceID (service being performed) and all the payment info (peripheral, not really important). what i would like to do is add a field, Area, that describes where on the house the labor is being performed, ie the roof, the master bedroom, the kitchen, etc...

is there any way to sort these using continuous forms (maybe 2 continuous forms?) kind of like in a report where it goes, for instance (ignore periods, for spacing only):

Area: Roof
.....Tearoff yadda yadda
.....Replace yadda yadda
Area: Kitchen
.....Redo electrical yadda yadda
.....Replace toaster etc etc
.....Fix plumbing etc etc
Area: Bathroom..... etc

thanks for any ideas...i know this is ridiculous, but i figured i'd give it a shot

View 2 Replies View Related

Forms :: Continuous Form With Command Button On Each Record To Open Another Form

Jul 30, 2014

I have a continuous form in which I put a command button for each record called "detail". I would like to click on the "detail" button and make it open another form containing all (and only) the info on this record.

At first I refused to use an "id" to link both forms, but finally I added the "id" in the table... however still does not work.

continuous form: "04 - GASTOS_BUSQUEDA"
id field on continuous form: "Gastid"

pop-up (details) form: "GASTOS_EDITAR"
id on pop-up (details) form: "editar_id"

This is what I have tried on the "click" properties of the "details" button field (called "btn_editgs"):

1)
DoCmd.OpenForm "GASTOS_EDITAR", acNormal, , "[editar_id] = " & Me.Gastid

2)
DoCmd.OpenForm "GASTOS_EDITAR", , , "[editar_id]=" & Me.Gastid

3)
stLinkCriteria = "[editar_id]=" & Me![Gastid]
DoCmd.OpenForm "GASTOS_EDITAR", , , stLinkCriteria

4)
Private Sub btn_editgs_Click()
On Error GoTo btn_editgs_Click_Err
Dim strWhere As String
strWhere = "[editar_id] = " & Me.Gastid
DoCmd.OpenForm "GASTOS_EDITAR", , , strWhere
btn_editgs_Click_Exit:
Exit Sub
btn_editgs_Click_Err:
MsgBox Error$
Resume btn_editgs_Click_Exit
End Sub

View 9 Replies View Related

Locking Fields For One Record On A Continuous Form

Jul 22, 2005

How can i apply the following code to the immediate record in my subform. I would like when the assigned check box value = true, then the fields for that record become locked.

Ive written the following code to an onclick event for a check box labeled "assigned" on my form, the problem is it executes on all the records in my form.

Q. How do i apply the code to only the immediate record?


Private Sub Assigned_Click()
If Me.Assigned.Value = True Then
Me.Serial_Number.Enabled = False
Me.Component_Group_ID.Enabled = False
Me.TypeID.Enabled = False
Me.Description.Enabled = False
Me.Status.Enabled = False

Else
Me.Serial_Number.Enabled = True
Me.Component_Group_ID.Enabled = True
Me.TypeID.Enabled = True
Me.Description.Enabled = True
Me.Status.Enabled = True

End If

End Sub

View 3 Replies View Related

Correct Picture To Each Record In Continuous Form

Jun 15, 2006

Hi Good-Morning (its morning here in Jamaica) (Whatever time of day it is where ever it is that you great minds are in this beautiful world we live)...

I created a form and used an image control with a filepathfield that is stored in my table,... that works well as far as displaying the correct picture for each record...

I now want to create a Continuous Form with the correct image displayed for each row or eachrecord///

The problem is all of the images are displaying the same picture, but i want them to show their correct pictures... I used an on current event which i guess is why tha is happening cause all the pictures change when different record selectors are clicked...

Please advise how i could get around this...
I looked at the Northwind database, but that database uses an OLE object, I would like to use the filePath field that i have in my database...

Any Ideas? Thanks in Advance

View 2 Replies View Related

Use Specific Record In Continuous Form For Event?

Oct 10, 2006

Hello,

I have a continuous subform that shows 2 records consisting of a text field and a yes/no field.
I was wondering if it was possible to take the state of one particular of the yes/no fields to trigger an event. Specifically, when one of the questions is checked [true] then I would like to make visible another subform on the main form.

Can this be done, and if so, how, or should I just leave my subform visible at all times?

Thank you.

View 12 Replies View Related

Queries :: Combobox In Continuous Form Record

Dec 2, 2014

A continuous form with fields Operation bounded integer, LibelBx unbounded combobox string with two columns as Sorter (Int), Phrase(str).

A table TargetTbl with field Operation(Int). A table TextArrayTbl with fields Phrase(str), Sorter(Int).

Relationship between TargetTbl and TextArrayTbl is one to many joined on Operation = Sorter.

I am trying to display the form. RecordSource = TargetTbl. LibelBx.RowSource = TextArrayTblQy.

The idea is to display every record from TargetTbl with Operation equal to Sorter from TextArrayTbl. The LibelBx combobox should display the Sorter and Phrase.

The queries are:

Code:
TextArrayTblQy = "SELECT TargetTbl.Booking, TargetTbl.Operation, TargetTbl.CodeBilan, TargetTbl.Debit, TargetTbl.Credit, TargetTbl.Total, TextArrayTbl.Sorter, TextArrayTbl.Phrase
FROM TargetTbl INNER JOIN TextArrayTbl ON TargetTbl.[Operation] = TextArrayTbl.[Sorter];"

Code:
TextArrayTblQy = "SELECT TargetTblQuery.Sorter, TargetTblQuery.Phrase
FROM TargetTblQuery, TextArrayTbl, TargetTbl
WHERE (([TargetTblQuery].[Sorter]=[TargetTbl].[Operation]));"

Code:
TargetTblQuery = "SELECT TextArrayTbl.Sorter, TextArrayTbl.Phrase
FROM TargetTbl, TextArrayTbl
WHERE (((TextArrayTbl.Sorter)=[TargetTbl].[Operation]));"

I managed to get the TexArrayTbl displayed in LibelBx combobox, but it displays all the records whereas I want it to display only the ones with Sorter = Operation.

View 2 Replies View Related

General :: Continuous Form With Textbox Record?

May 15, 2014

I'm building a database to control projects of new products for a company, the flow is easy:

-Step 1: Record the general information in a main table (db_master_info) (i.e. project name, description, date of launch, etc.)
- Step 2: Record the product codes in a detail table (db_units) (i.e. product codes and quantities)
-Step 3: Record monthly information like, production and sales forecast in the detail table (db_units)
-Step 4: Build a monthly stock equation(production minus sales forecast) and record a comment, in a comment table (db_comments), about the results.

The steps 1,2,3 and 4 I did successfully!

The step 5, I'm unable to think outside of the box!

I drew a sketch (form_stock and comments.jpg attached) that might be a possible solution...

Use a continuous subform with a unbound textbox with VBA to load record and edit/update???

How do I do this?

View 3 Replies View Related

Modules & VBA :: Go To Last Record In Continuous Form And Highlight It?

Sep 8, 2014

I have a log of items I currently inventory. When you click on an item, it opens another form with a sub-form that lists the history of changes for said item in a continuous form display.

What I want to be able to do is when that form is opened, the sub-form will highlight the last entry (either bold it, or change the background).

View 8 Replies View Related

Forms :: Selecting Only One Record In Continuous Form?

Nov 13, 2013

I wish having only one record display in a continuous form, after an "On Click" event. The database in which this question lies is attached.

On opening, the user first interacts with Table 1 (Continuous Form), then by clicking on ID on the details for that particular record appear.

What I would like to do is: When the user clicks on ID, only that record whose ID has been clicked on displays first on the continuous form, and then the PERSONAL form opens. To clarify further, my wish is that the sequence of events is:

User Opens Table 1 Form

User Clicks on ID (for example, let's take 2)

Only Record with ID 2 remains on the Continuous form.

Then details for record 2 display on the Personal Form that opens next.

The problem I currently have is with step number 3 above.

View 10 Replies View Related

Forms :: Add / Edit New Record Only Continuous Form?

Mar 27, 2014

I have a continuous form with unbound controls. These controls write new records into a table using rec.addnew

If possible, I would like for the user to only be able to add/edit the new record only and not to edit the continuous form below. When I turn off edits on the form, I only get the new record to show. I found some pages that reference using code like .allowAdditons, .allowEdits and .allowDeletions but unsure of how to implement them since I have more than one control the user is entering data into. I also found another site that says to use a control to determine if the record is writable to: I do have a control that is set to =Date() on the default value.

View 13 Replies View Related

How To Identify Which Record In Continuous Form Was Clicked On

Nov 6, 2011

I have a continuous form with an image and a text box on it. When the image is clicked, some text should appear in a text box. The problem is that the text appears in the text box of the incorrect record.

Suppose the first record is the 'current' record (i.e., having the record selector to its left), and the user clicks on the image in the third record. Then the text appears in the first record, not the third.

Is there a way to find out which of the records was clicked on? Or, can I change the current record to be the one whose image was clicked on?

View 13 Replies View Related

Forms :: Refer To Specific Record In Continuous Form

Apr 15, 2013

I have a main form with a continuous sub-form. On the main form I have a series of text boxes that I want to use as a makeshift status bar. The text boxes would be filled in if a value was entered into certain records on my sub-form.The problem I have is since the sub-form is continuous, how would I refer to the specific record on the sub-form that I want to check for a value?

View 6 Replies View Related

Unbound Text Field In Continuous Form: Update One Record, They All Get The Same Value

Feb 20, 2006

Hi,

I want to show some text from another table based on the values of the bound fields in each record of a continuous form. I thought it would be easy, but I can't get it to work.

I step through the records in the bound recordset and use some of the values to query another table. Then I use the value from the query to populate the unbound text field.

It works fine for each record. But every time the unbound field is updated, all the records in the continuous form are updated.

I'm stuck on this one. It's probably something simple to fix - if you know what to do!

Do you have any suggestions?

Thanks!
-Daniel

View 10 Replies View Related

Forms :: Continuous Form - Saving New Record When Data Passed To It

Dec 11, 2013

I have a continuous form it has a field (DateStart) and a field (DateStartCarryOver). There is an event on (DateStart) for the (DateStart.Value) to be passed to a new record in (DateStartCarryOver).

My probem is that the new record dosent get saved (i.e. it dosent get an ID so a record isnt created. How can I create that record once the data has bee pased to it?

View 3 Replies View Related

Forms :: Combo Box On Continuous Form Updating Current Record Only

Jul 29, 2013

Combo box on continuous form should have the control source listed as the field on the form that will be updated. The Row Source, however, is a query that includes 2 things: the field on the form that will be updated (this part will be nonvisible in your form) and the table/query of selections you want to show up in the combo box (visible). Then ensure the Bound column is set to 1 and the Column count is set to 2 with Column Widths as 0";1"

View 1 Replies View Related

Forms :: Display Button On Selected Record In Continuous Form

Oct 30, 2014

I have continuous form in Access 2010. I highlight selected record. Now I would like when user will select record, that record will display button to give ability user delete it. For not selected records button not visible and disable. How to display button only in selected record in continuous form?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved