473,668 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Move Cursor to specific record

63 New Member
I create a form which displays records in a list and allows the user to click on the last field of each record to update it. After the record is updated, the form is refreshed. The problem is as follows:

Let's say there are 5 records dislayed as listed below. By clicking REP on Model A, the field Supported is changed from Y to N. After the form is refreshed, it displays properly, but the cursor does not stay on the record worked on. If there are 100 records, it creates a problem for the user who will have to continually scroll to the next record. In MS Access let's say the record was called rec, I could check the rec.AbsolutePos ition of the selected record, store it in a variable say recpos and then use the command rec.Move recpos to move to the record after the form is refreshed. When I did this on the web, the rec.AbsolutePos ition always returned -1. Is there a way to accomplish this?

Area Model Supported
Area A Model A Y REP
Area B Model B Y REP
Area C Model C Y REP
Area D Model D Y REP
Area E Model E Y REP
Apr 25 '12 #1
4 2306
jhardman
3,406 Recognized Expert Specialist
look into the cursor type, but even then I'm not sure you can keep your place from one screen refresh to the next.

Jared
May 2 '12 #2
rmurgia
63 New Member
Jared,

Thanks for the reply. Actually, when I said cursor, I meant the mouse pointer on the screen. The user can only update one of the fields on this screen called Supported, to indicate if a particular make and model series is supported. The update works fine but when the screen is redisplayed, we have and issue. Here is the code used after the user updates the data to re-display the screen:

Expand|Select|Wrap|Line Numbers
  1.    strSQL = "SELECT Make,ModelSeries,Area,MFP,Supported"
  2.    strSQL = strSQL & " FROM u_vPSLAreaMaintExceptions"
  3.    strSQL = strSQL & " Make >= '" & strMake & "' And "
  4.    strSQL = strSQL & " ModelSeries >= '" & strModelSeries    
  5.  
  6.    rec.Open strSQL, conn 
  7.  
  8.   Do While not rec.EOF 
  9.     Response.Write "<tr class='leftcol'>"  
  10.     Response.Write "<td colspan=""7"">" & rec("Make") & " </td>"
  11.     Response.Write "<td colspan=""10"">" & rec("ModelSeries") & " </td>"
  12.     Response.Write "<td colspan=""3"">" & rec("MFP") & " </td>"
  13. </td>"
  14.     Response.Write "</tr>"    
  15.     rec.MoveNext    
  16.   Loop
  17.  
If a user enters a particular Make and ModelSeries all records equal to or greater than that record will display. This works okay, but what we would like to be able to do is display all of the records and just move the pointer to the last record entered. I believe in MS Access, the code would be rec.Move along with the number. Would that be possible in VBScript? Thanks.
May 3 '12 #3
jhardman
3,406 Recognized Expert Specialist
oh, I gotcha. the easiest way is with javascript. remember, ASP is executed on the server, if you want the screen to interact with the user, you have to do something on their pc - so javascript is going to be the way to go.

Jared
May 4 '12 #4
rmurgia
63 New Member
Ok Thanks. I guess I should post this in the Javascipt section.
May 4 '12 #5

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

Similar topics

5
24027
by: deko | last post by:
I have a subform datasheet that contains a full year of records sorted by a date field. I'm trying to programmatically move the record selector on the datasheet to the first record that matches a particular date. For example, the user clicks a button and the record selector moves to the first record that matches today's date. I was thinking something like this, but I'm not having any luck: Dim rst As DAO.Recordset Set rst =...
2
7134
by: RC | last post by:
I would like to go to a specific record based on what the user types in a text box on a form. I have a table named: Boxes in the table there is a field named: BoxNumber a form named: BxForm and a text box on the form named: GetNumBox I want to type a number in the text box and then press the enter key on the keyboard and go to the corresponding record.
3
4195
by: Chris | last post by:
Hello all. I have a database that I use to send email updates to people. Everything is working fine, but one suggestion I keep getting is to add a link to the automatic emails that will open up the database, then open to the correct form and record. I can write a simple macro to open a form and a specific record, but what I can't figure out is how can I get that speciic record number in a command line link? Here's an example...
2
8792
by: Anand Ganesh | last post by:
Hi All, How to Implement Move Next, Move Previous, Last Record and First Record in a DataGrid Control ? Is there any standard tool available in the tool box button? Thanks for your time. Regards Anand Ganesh
1
5019
by: Regnab | last post by:
The record's primary key is the report number. The form in which data is entered or modified has this Report Number at the top. I would like to know if I could use SQL in the VB code so that on Exit of the 'Report Number' text box, the code can scan through to see if that report number exists and if so, jump to it. I was looking through and thought maybe docmd.GoToRecord, but that seem to only move a specific number of records - not via...
2
11271
by: nkoske | last post by:
I have a form with a subform in datasheet view and I have a event on one of the fields in the subform, so that the user can double click it and go to expanded information based on that field. I'm using this code: Private Sub SpecimenNum_DblClick(Cancel As Integer) DoCmd.OpenForm "RDDevice", , , " = '" & Me! & "'" End Sub
4
2913
by: BerkshireGuy | last post by:
Is there a way to create a shortcut to open a MS Acccess DB and have it go to a specific record? In my DB, when a user delegates a record to another users, I currently send out an email to the personing saying they been delegated to followup on an item. I list the reference number, but was thinking that it would be really cool if I could attach a shortcut in the email that would go to the record.
3
27294
by: cmp80 | last post by:
I have a database that I am using to store student data. There are two tables and two forms to display the data: Tables tbStudent tbRE Forms fmStudent fmRE
2
3370
by: Jpipher | last post by:
Let me explain what I am trying to accomplish... Two forms -- we'll call them "Main" and "Related" A command button on "Main" runs a union query. The union query results are shown in "Related" in Datasheet view. I want to then double click on the textbox ! and either move ! to that specific record or if I need to I am willing to open another form showing the same information.
1
6561
by: cvillav | last post by:
Hello, I am new to Access and this forums, I have two tables and two forms to display the data. Tables Tbuilding Tcriteria Forms fmbuilding
0
8462
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...
0
8382
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
8893
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...
0
8802
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7405
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...
0
5682
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
4206
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...
2
2028
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1787
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.