Connecting Tech Pros Worldwide Help | Site Map

Buttons in continuous foms

Paolo
Guest
 
Posts: n/a
#1: Nov 13 '05
I have a save button in a continuous form called Purchase Order. The button
contains several conditional statements which make sure that all mandatory
fields are properly filled out by the user. When the button in clicked it
only applies the statement to the record the cursor is currently working on.
I would like the button to apply to all the records. I tried a Do/Loop
statement sending the focus to the next record, but once it gets to the end
I get an error message saying: "Cannot find specific record." I also have
tried a Do Until Loop and again it stops only at one record.

Any suggestions???

Thanks in advance...

Paolo


Rick Brandt
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Buttons in continuous foms


Paolo wrote:[color=blue]
> I have a save button in a continuous form called Purchase Order. The
> button contains several conditional statements which make sure that
> all mandatory fields are properly filled out by the user. When the
> button in clicked it only applies the statement to the record the
> cursor is currently working on. I would like the button to apply to
> all the records. I tried a Do/Loop statement sending the focus to the
> next record, but once it gets to the end I get an error message
> saying: "Cannot find specific record." I also have tried a Do Until
> Loop and again it stops only at one record.
> Any suggestions???
>
> Thanks in advance...
>
> Paolo[/color]

I fail to see the need for this. Your validation should be applied before a
record is allowed to be saved and all of the other rows on a continuous form
have already been saved so why any need to check them?

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


Paolo
Guest
 
Posts: n/a
#3: Nov 13 '05

re: Buttons in continuous foms



"Rick Brandt" <rickbrandt2@hotmail.com> wrote in message
news:34bnuqF479po3U1@individual.net...[color=blue]
> Paolo wrote:[color=green]
>> I have a save button in a continuous form called Purchase Order. The
>> button contains several conditional statements which make sure that
>> all mandatory fields are properly filled out by the user. When the
>> button in clicked it only applies the statement to the record the
>> cursor is currently working on. I would like the button to apply to
>> all the records. I tried a Do/Loop statement sending the focus to the
>> next record, but once it gets to the end I get an error message
>> saying: "Cannot find specific record." I also have tried a Do Until
>> Loop and again it stops only at one record.
>> Any suggestions???
>>
>> Thanks in advance...
>>
>> Paolo[/color]
>
> I fail to see the need for this. Your validation should be applied before
> a record is allowed to be saved and all of the other rows on a continuous
> form have already been saved so why any need to check them?
>
> --
> I don't check the Email account attached
> to this message. Send instead to...
> RBrandt at Hunter dot com[/color]

This is what the form is for: it reports details of a specific purchase
order against the details of the supplier invoice and the details of a form
that the warehouse needs to fill out manually (count of physical stock). The
data entered has to equal from Qty Received to Qty Order and Qty Invoiced.
The same has to happen for Cost Order and Cost Invoiced. The form has 3
Variance columns that compare the details above. When the user click on the
"Save" button this button should check that every variance for each record
equals to 0.00, if it doesn't it gives a warning message and does not allow
the user to save.
Unfortunately I can't make the button check every record (or every line) it
just stops at the one where the cursor is flashing...
I hope I made a little more sense this time....
Thanks again for your help


PC Datasheet
Guest
 
Posts: n/a
#4: Nov 13 '05

re: Buttons in continuous foms


I go along with what Rick said. When you go from one record to another in a
continuous form, the first record gets saved. It's too late to go back and
check the first record.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
resource@pcdatasheet.com
www.pcdatasheet.com


"Paolo" <prabbit@netspace.net.au> wrote in message
news:crqpj0$20lv$1@otis.netspace.net.au...[color=blue]
>
> "Rick Brandt" <rickbrandt2@hotmail.com> wrote in message
> news:34bnuqF479po3U1@individual.net...[color=green]
> > Paolo wrote:[color=darkred]
> >> I have a save button in a continuous form called Purchase Order. The
> >> button contains several conditional statements which make sure that
> >> all mandatory fields are properly filled out by the user. When the
> >> button in clicked it only applies the statement to the record the
> >> cursor is currently working on. I would like the button to apply to
> >> all the records. I tried a Do/Loop statement sending the focus to the
> >> next record, but once it gets to the end I get an error message
> >> saying: "Cannot find specific record." I also have tried a Do Until
> >> Loop and again it stops only at one record.
> >> Any suggestions???
> >>
> >> Thanks in advance...
> >>
> >> Paolo[/color]
> >
> > I fail to see the need for this. Your validation should be applied[/color][/color]
before[color=blue][color=green]
> > a record is allowed to be saved and all of the other rows on a[/color][/color]
continuous[color=blue][color=green]
> > form have already been saved so why any need to check them?
> >
> > --
> > I don't check the Email account attached
> > to this message. Send instead to...
> > RBrandt at Hunter dot com[/color]
>
> This is what the form is for: it reports details of a specific purchase
> order against the details of the supplier invoice and the details of a[/color]
form[color=blue]
> that the warehouse needs to fill out manually (count of physical stock).[/color]
The[color=blue]
> data entered has to equal from Qty Received to Qty Order and Qty Invoiced.
> The same has to happen for Cost Order and Cost Invoiced. The form has 3
> Variance columns that compare the details above. When the user click on[/color]
the[color=blue]
> "Save" button this button should check that every variance for each record
> equals to 0.00, if it doesn't it gives a warning message and does not[/color]
allow[color=blue]
> the user to save.
> Unfortunately I can't make the button check every record (or every line)[/color]
it[color=blue]
> just stops at the one where the cursor is flashing...
> I hope I made a little more sense this time....
> Thanks again for your help
>
>[/color]


Rick Brandt
Guest
 
Posts: n/a
#5: Nov 13 '05

re: Buttons in continuous foms


Paolo wrote:[color=blue]
> "Rick Brandt" <rickbrandt2@hotmail.com> wrote in message
> news:34bnuqF479po3U1@individual.net...[color=green]
>> I fail to see the need for this. Your validation should be applied
>> before a record is allowed to be saved and all of the other rows on
>> a continuous form have already been saved so why any need to check
>> them?[/color]
> This is what the form is for: it reports details of a specific
> purchase order against the details of the supplier invoice and the
> details of a form that the warehouse needs to fill out manually
> (count of physical stock). The data entered has to equal from Qty
> Received to Qty Order and Qty Invoiced. The same has to happen for
> Cost Order and Cost Invoiced. The form has 3 Variance columns that
> compare the details above. When the user click on the "Save" button
> this button should check that every variance for each record equals
> to 0.00, if it doesn't it gives a warning message and does not allow
> the user to save. Unfortunately I can't make the button check every record (or
> every
> line) it just stops at the one where the cursor is flashing...
> I hope I made a little more sense this time....
> Thanks again for your help[/color]

I still don't fully understand your situation, but I can see where you might be
performing this validation after-the-fact and would need to examine all records.
However; in that scenario you do not want to use the Save event for this and
prevent saving the currenmt record if there is a problem found because the
problem might exist on a different record than the current one. Now the user
needs to fix record 3, but he is stuck on record 4 because you won't let him
save it due to the problems in record 3.

Basically you would need to use the RecordSetClone of the form and then loop
through that testing each record in sequence. Then you could display a message
box when problems are found, but again I think you still have to let the current
record be saved unless the problem found is ON the current record.


--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com





Paolo
Guest
 
Posts: n/a
#6: Nov 13 '05

re: Buttons in continuous foms



"Rick Brandt" <rickbrandt2@hotmail.com> wrote in message
news:34daffF47jivsU1@individual.net...[color=blue]
> Paolo wrote:[color=green]
>> "Rick Brandt" <rickbrandt2@hotmail.com> wrote in message
>> news:34bnuqF479po3U1@individual.net...[color=darkred]
>>> I fail to see the need for this. Your validation should be applied
>>> before a record is allowed to be saved and all of the other rows on
>>> a continuous form have already been saved so why any need to check
>>> them?[/color]
>> This is what the form is for: it reports details of a specific
>> purchase order against the details of the supplier invoice and the
>> details of a form that the warehouse needs to fill out manually
>> (count of physical stock). The data entered has to equal from Qty
>> Received to Qty Order and Qty Invoiced. The same has to happen for
>> Cost Order and Cost Invoiced. The form has 3 Variance columns that
>> compare the details above. When the user click on the "Save" button
>> this button should check that every variance for each record equals
>> to 0.00, if it doesn't it gives a warning message and does not allow
>> the user to save. Unfortunately I can't make the button check every
>> record (or every
>> line) it just stops at the one where the cursor is flashing...
>> I hope I made a little more sense this time....
>> Thanks again for your help[/color]
>
> I still don't fully understand your situation, but I can see where you
> might be performing this validation after-the-fact and would need to
> examine all records. However; in that scenario you do not want to use the
> Save event for this and prevent saving the currenmt record if there is a
> problem found because the problem might exist on a different record than
> the current one. Now the user needs to fix record 3, but he is stuck on
> record 4 because you won't let him save it due to the problems in record
> 3.
>
> Basically you would need to use the RecordSetClone of the form and then
> loop through that testing each record in sequence. Then you could display
> a message box when problems are found, but again I think you still have to
> let the current record be saved unless the problem found is ON the current
> record.
>
>
> Actually I want to prevent the user from saving a specific record unless
> every line on the order is correct, that's why it's important for me that
> the user cannot just save one line and close the form. Every line of the
> invoice must match every line of the order 100% otherwise I don't want to
> allow the user to go forward....[/color]

How do you use the RecordSetClose could you give me an example?

Thank you again for your patience...I am just starting to write VBA
statement and really really struggling with them...

Paolo[color=blue]
>
>[/color]


Rick Brandt
Guest
 
Posts: n/a
#7: Nov 13 '05

re: Buttons in continuous foms


Paolo wrote:[color=blue][color=green]
>>
>> Actually I want to prevent the user from saving a specific record
>> unless every line on the order is correct, that's why it's important
>> for me that the user cannot just save one line and close the form.
>> Every line of the invoice must match every line of the order 100%
>> otherwise I don't want to allow the user to go forward....[/color]
>
> How do you use the RecordSetClose could you give me an example?
>
> Thank you again for your patience...I am just starting to write VBA
> statement and really really struggling with them...[/color]

Ok, now we're back to what I originally said. In a continuous form each line is
saved to disk as soon as you move to a different line. So there is no need to
check line1 when you are finished entering line2 because line1 was already
checked when it was entered.

IOW if you check each line as it is entered, then there is no need to check any
line except for the one you are currently working on.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


Paolo
Guest
 
Posts: n/a
#8: Nov 13 '05

re: Buttons in continuous foms



"Rick Brandt" <rickbrandt2@hotmail.com> wrote in message
news:34fam6F492p83U1@individual.net...[color=blue]
> Paolo wrote:[color=green][color=darkred]
>>>
>>> Actually I want to prevent the user from saving a specific record
>>> unless every line on the order is correct, that's why it's important
>>> for me that the user cannot just save one line and close the form.
>>> Every line of the invoice must match every line of the order 100%
>>> otherwise I don't want to allow the user to go forward....[/color]
>>
>> How do you use the RecordSetClose could you give me an example?
>>
>> Thank you again for your patience...I am just starting to write VBA
>> statement and really really struggling with them...[/color]
>
> Ok, now we're back to what I originally said. In a continuous form each
> line is saved to disk as soon as you move to a different line. So there
> is no need to check line1 when you are finished entering line2 because
> line1 was already checked when it was entered.
>
> IOW if you check each line as it is entered, then there is no need to
> check any line except for the one you are currently working on.
>
> --
> I don't check the Email account attached
> to this message. Send instead to...
> RBrandt at Hunter dot com
>[/color]
No I have to make sure that the user has typed the right data on each line
the then the access can resave the record I am aware of the fact that each
record is saved once the user goes to the next line but I need to make sure
the used do type the details from the Invoice and from the count form before
they can close the form. Therefore I need Access to check that every line
has all the relevant fields filled out and that the no variances between
Invoice and Orders are reported...


Closed Thread