473,786 Members | 2,737 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to go to previous record satisfying some condition

44 New Member
i have 4 optionbuttons in my form.
if i select 1st optionbutton traineeans.valu e=1,2ndbutton traineeans.valu e=2...like that.If he didnt select anyone traoneeans.valu e=0.
one commandbutton is there named previous unaswered,and other command button is next.
if i click that button previousunansww ered i want to go to previous
record where traineee ans.value=0.
DoCmd.GoToRecor d , , acprevious is going to the previous record.but i want to go to previous record where traineeans.valu e=0
how to write the code. please help me
thanks in advance
Apr 5 '07 #1
1 2817
Rabbit
12,516 Recognized Expert Moderator MVP
Well, what you'll want to do is go back to the previous record and then use a while loop to keep moving back as long as it's not the first record and the option group is not equal to 0.
Apr 5 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
10988
by: george | last post by:
Can anyone help? I query a database and return a result on the column "reference". There might be 7 listings. Each row is displayed in a table, with links through to a detail page. I am working on having a "previous" record and a "next" record link on the detail page. This code below works, for the "next" record, by searching the values in the array $myarray for the variable $ref. It then returns the key value and the key value, as a...
5
9479
by: Bob Bedford | last post by:
Does exist a next prev function in PHP/Mysql. I've a website with returns lot of records (say about 200). The user may browse trough the list or returned records, but he has to click the record result then click back's browser in order to see the next record. I'd like to provide a "see next" and "see previous" record in the details itself. How to do so ? Bob
5
2227
by: Steve Strik | last post by:
My Problem: I have created a database here at work that is exhibiting some very strange behaviour. Essentially the database is structured in a manner where one table is a master record table (tbl_MainRegister) providing a unique identifier for documents and a means for identifying the docuement type. There are then 4 additional tables (tbl_Meetings, tbl_Documents, tbl_Project, tbl_Correspondence) which store the document details.
4
4057
by: amywolfie | last post by:
I've been trying to do something for about 3 days – I get close, but not 100%. I am trying to: Open frmRevisionHistory from a button on frmFeeInput. If there is NO RELATED RECORD, then I need to create one in frmRevisionHistory, and pass the PK (PK_Fees) on frmFeeInput to FK_Fees on the 2nd form.
3
9182
by: MartinR | last post by:
Hi, I'm still new to writing code in vba as I've only been introduced to access three weeks ago. I have written this code below and it executes but does not do what I want it to do. What I want is the form "Sparesform" to open when I double click on the "index" field for the record I wish to view. The index field is part of a subform. What is happening at the moment is the form "Sparesform" is opening but does not go to the correct record...
0
2698
by: KelHemp | last post by:
Greetings, I've been using this site for lots of access help in the past, and it's very helpful! I have a new complexity for you all. Reworking a form to record 70-80 years of oil production on multiple leases, which have multiple wells within them. Most wells can fit on one printed page (one record), but in the case of overspill, we want to do the following: -Move to a new record and auto fill the LeaseName, LeaseNumber, Operator,...
1
4341
by: roveagh1 | last post by:
Hi I've been using the 2 year old link below to repeat values from previous record field into current corresponding field. It's worked fine for text but the last piece of advice was to use the same logic for a date field. i.e. theValue.defaultvalue = "#" & theValue.value & "#" I can't get this to work for some reason and I can't figure out why. Can anyone out there help? Thanks Repeat value of previous record field into current...
6
1817
by: neenaprasad | last post by:
I have to take values from two tables with single sql statement. SQl = SELECT MemAccounts.MemberID,COUNT(MemAccounts.MemberID) AS Total, Membership.First_Name, Membership.Last_Name FROM MemAccounts, Membership WHERE MemAccounts.IntroduceeID <> 0 AND Membership.IsAgent = 1 AND MemAccounts.MemberID = Membership.MemberID AND MemAccounts.TransDate BETWEEN '" &x_FromDate& "' AND '" &x_ToDate& "' GROUP BY MemAccounts.MemberID,...
4
21457
by: falconerlf | last post by:
In crystal reports when I write a formula I can state a condition of say if the current field is blank, then print the content of the same field but from the previous record. The function is Previous () and it works beautifully. I need this same function in Access. There has to be a way that I can do this in Microsoft Access. I am not a VBA developer but if someone points me in the right direction as to how to state this in an Access...
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10110
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
9961
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8989
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
7512
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
6745
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
5397
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
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2894
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.