Continuous Form Issues

strikeuk

Registered User.
Local time
Today, 13:59
Joined
Dec 30, 2005
Messages
12
Hi, i've attached an image so it would be easier for you guys to understand my problem. I'm currently using continuous form to display my records and my problem is that i would like to have the second field in my "Rec Qty" column to retrieve the value from the first field of the Total Bal column whenever i create a new record. Is this possible?

Thank you
 

Attachments

  • Problem.jpg
    Problem.jpg
    32.7 KB · Views: 177
Place a command button in the Details section of the form.
Let's say you want to place the value from record one into a new record. Click on the record whose value you will be copying to the new record (focus on say Total Balance text box). Then click on the command button

Place the following code in the On Click Event of your Command Button:

Dim copyname As String
copyname = me.totalbalance
DoCmd.GoToRecord , , acNewRec
Me.Qtyreceived = copyname

Hope this helps
 
Thanks for the help but i'm getting an error that says it can't assign a value to this object. You see my bal qty field auto calculates from rec qty and oqty. The values in balqty and totalbal are not saved in the db.

Here are my control source for the two text box
[balQty] =[Parent].[OQTY]-[RecQty]
[totalbal] = [balQty]+[AQN]

So the totalbal value is supposed to bring forward its value to the next row.
 
Use can use the default Value on your text options using =[bal qty], or what ever your text box is called that you want to show in another textbox.
 
That doesn't work either it's still retaining the original value.
 
Yes i tried it with a new data entry, but i think the controlsource is overriding the default value. I just tried something, i created two text boxes on top one another under bal qty, one not visible and one visible so when it's in the 2nd record the 2nd text box which refers to the totalbal value will be enabled and the original one will be hidden. This works for the 2nd row but it changes the 1st row as well.
 
Last edited:
OK, you're not storing the balQty or the TotalBal, so they must be only for reference to the user while he is adding transactions. Yes?
Perhaps this approach will work:
Put a form header on your subform.
Put an unbound text box (BalQty) in the header.
Set its control source to "=Forms![NameOfParentForm]!oqty-Sum([recqty])".
Now you have a dynamic indication of the remaining balance.
You could put code in the subform's before insert event to keep the user from exceeding the available qty.

I know this is only half a solution, but it may give you ideas on how to handle the TotalBal field.

Just keep in mind that on a continuous form, if it ain't attached to the record source, it ain't really repeated...just copies of the same object.
 

Users who are viewing this thread

Back
Top Bottom