473,847 Members | 1,472 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Continuous Form-Staying on current record

Hi everyone:
This is probably a pretty simple problem but it is driving me nuts.

Using Access 2000. I have a continuous form which list several
thousand inventory items. The user can enter a order quantity on any
given line. I have several different error checks depending on what
the user enters in the quantity text box.

What I need is a way to keep the user on that current record if he has
any errors. This needs to be done if he tabs or clicks to a different
record. If there is an error he needs to be positioned back to the
record that caused the error.

Need a solution that would work in the error occurs on the first
record, the last record, any record inbetween or if there is only one
record on the continuous form.

Any help would be appreciated.

Apr 27 '07 #1
5 7395
eighthman11 wrote:
Hi everyone:
This is probably a pretty simple problem but it is driving me nuts.

Using Access 2000. I have a continuous form which list several
thousand inventory items. The user can enter a order quantity on any
given line. I have several different error checks depending on what
the user enters in the quantity text box.

What I need is a way to keep the user on that current record if he has
any errors. This needs to be done if he tabs or clicks to a different
record. If there is an error he needs to be positioned back to the
record that caused the error.

Need a solution that would work in the error occurs on the first
record, the last record, any record inbetween or if there is only one
record on the continuous form.

Any help would be appreciated.
Pull up the property sheet for the form, go to the Other tab, and set
Cycle to Current record.

Under the Events tab for the form in the BeforeUpdate event you might
have something like this
Cancel = True
If IsNull(CustName ) Then
Msgbox "Name required"
Me.CustName.set focus
Elseif OrderAmt < 0 then
msgbox "Amt must be greater than 0
Me.OrderAmt.Set Focus
Else
Cancel = False
Endif

It must pass the error checks before it will save the record data.
Apr 27 '07 #2
Use the Form_BeforeUpda te event to do your error-checks. If a check fails,
set Cancel = True. The focus will remain on the current record.

"eighthman1 1" <rd******@noote r.comwrote in message
news:11******** **************@ b40g2000prd.goo glegroups.com.. .
Hi everyone:
This is probably a pretty simple problem but it is driving me nuts.

Using Access 2000. I have a continuous form which list several
thousand inventory items. The user can enter a order quantity on any
given line. I have several different error checks depending on what
the user enters in the quantity text box.

What I need is a way to keep the user on that current record if he has
any errors. This needs to be done if he tabs or clicks to a different
record. If there is an error he needs to be positioned back to the
record that caused the error.

Need a solution that would work in the error occurs on the first
record, the last record, any record inbetween or if there is only one
record on the continuous form.

Any help would be appreciated.

Apr 27 '07 #3
Thanks for the help. One more question. If the error check fails and
I do a cancel = true is there a way I can return the quantity order
back to its original value before the error check. I tried to set the
value in the beforeupdate event but it would not let me.
Apr 27 '07 #4
Assuming your control name for the quantity ordered field is 'txtOrderQty',
then:

Me.txtOrderQty. Undo

ought to do the trick.

"eighthman1 1" <rd******@noote r.comwrote in message
news:11******** *************@n 15g2000prd.goog legroups.com...
Thanks for the help. One more question. If the error check fails and
I do a cancel = true is there a way I can return the quantity order
back to its original value before the error check. I tried to set the
value in the beforeupdate event but it would not let me.


Apr 27 '07 #5
On 27 Apr 2007 09:29:06 -0700, eighthman11 <rd******@noote r.comwrote:
>Thanks for the help. One more question. If the error check fails and
I do a cancel = true is there a way I can return the quantity order
back to its original value before the error check. I tried to set the
value in the beforeupdate event but it would not let me.
See post by Salad

Chuck
--
Apr 27 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6331
by: Damian | last post by:
Hi. Is there a way to programatically populate a continuous form? I have an array of descriptions that I want to display in the continuous form and I have a textbox on the form called 'txtDescription' I can populate the text box using this code: Me.txtDescription.Value = myArray(1) Trouble is, I can't figure out how to get more than 1 row to display
1
1836
by: Marcia | last post by:
I have a combobox for types of music and a combobox for artists. The rowsource query for the artists combobox associates artists with different types of music. In the query I use the name of the type of music combobox to limit the list of artists when a type of music is first selected. This works well in a single form but I'm having trouble in a continuous form. In a continuous form, when I select a type of music, in all the records where...
10
3432
by: DFS | last post by:
I'm sure this has been discussed before, but I'm too tired to hunt for it. I have a survey table containing questions with different answer scales. Some are 1 to 5, others are A,B,C, etc. I show these answer scales in a listbox. When the scale type changes, the list items should change. Problem is, the bound continuous form shows for all questions only the scale for the first question - unless I click on a question with a different...
20
10844
by: Robert | last post by:
Need some help to stop me going around in circles on this one.... Have a nested subform (subform2) which simulates a continuous form for the record on the parent subform. Subform2 has rows of either an option button plus two text fields or a checkbox plus two text fields Am wanting to save the user entries into an underlying table. Tag property for each option button, check box or text field has the value of the key
1
2787
by: tizmagik | last post by:
I have a combobox on a continuous form that has a recordsource that is set upon Form_Load event via VBA (based on initial form data and external form data entered). For data entry purposes the Combobox's value is saved to *another* field (text-field) in the appropriate table (this text-field is not visible in the Continuous Form); so the combobox is pretty much just for data-lookup purposes (so the user does not have to type anything). ...
6
7896
by: balancetotal | last post by:
Creating a running sum in continuous form in Access 2003 -------------------------------------------------------------------------------- Hello: I have three forms on my user-interface. Main form is called frmPatients. Within this main form is an embedded form called fromVisitDates. Linked to this form is the form called fsubfrmServices.
7
6069
by: ARC | last post by:
Hello all, What's the proper paper size setting if you want to do a receipt printer report, that's a continuous form? I don't really see an option for a continuous paper size. Thanks! Andy
5
3516
by: fauxanadu | last post by:
I have a continuous form and a button in the header of the form. When I click the button, the following code is executed: Private Sub cmdTest_Click() Dim objControl As Control For Each objControl In Me.Controls If (objControl.ControlType = acTextBox) Then Debug.Print objControl.Value
8
11669
by: Steffen Beck | last post by:
Hi NG I need some help with a problem on my forms. If I have 2 related tables, for instance companies and employees, and want to display all companies on a continuous form with their employees on a sub form as another continuous form, as shown below
1
3900
realayumi
by: realayumi | last post by:
ACCESS 2003 WIN XP Hi, i'm new in access, just a view days, this is my first post. Sorry for my bad English. I have 3 tables. tbl_product
0
9734
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10991
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10718
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9490
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7888
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7061
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5725
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5915
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3168
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.