473,511 Members | 14,134 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.AbsolutePosition 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.AbsolutePosition 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 2299
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
23995
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...
2
7128
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 ...
3
4187
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...
2
8784
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. ...
1
5010
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...
2
11253
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. ...
4
2903
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...
3
27279
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
3363
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"...
1
6537
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
7237
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,...
0
7137
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...
0
7349
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,...
0
7417
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...
1
7074
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...
0
5659
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,...
1
5063
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...
0
3219
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...
0
3210
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.