473,524 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bookmarking

Below is what I have so far. The problem I am having is this. If I
click OK on the message, and then tab out of the field, the rs.movenext
event occurs without resetting the code. Each record has a field
"fldDate". Is there a way to have the recordset equal to the open
forms field "fldDate" -1? This way, whatever record I am in or move
to, the code works.

Private Sub BOILER_1_GAS_METER_BeforeUpdate(Cancel As Integer)
Dim rs As Recordset
Dim lngcompare As Long
Dim strmsg As String
Dim msg, style, title, respose

Set rs = Me.RecordsetClone
With rs
.MoveNext
lngcompare = ![boiler 1 gas meter]
End With
msg = "Please enter a value greater " & vbCrLf & "than previous value
of " & lngcompare & "."
style = vbOKOnly
title = "Invalid Entry"
If Me.BOILER_1_GAS_METER < lngcompare Then
Response = MsgBox(msg, style, title)
If Response = vbOK Then
Cancel = True
End If
End If
rs.Close
Set rs = Nothing
End Sub

Dec 12 '05 #1
1 1284
GoalieGW <Go******@ptd.net> wrote:
<snip>
: "fldDate". Is there a way to have the recordset equal to the open
: forms field "fldDate" -1? This way, whatever record I am in or move
: to, the code works.

<snip>
: Private Sub BOILER_1_GAS_METER_BeforeUpdate(Cancel As Integer)
' Try this:
Dim bk as Variant ' <-----------------
bk = Me.Recordset.Bookmark ' <-----------------

: Set rs = Me.RecordsetClone
: With rs
.bookmark = bk ' <-----------------------------------
: .MoveNext
: lngcompare = ![boiler 1 gas meter]
: End With
: msg = "Please enter a value greater " & vbCrLf & "than previous value
: of " & lngcompare & "."
: style = vbOKOnly
: title = "Invalid Entry"
: If Me.BOILER_1_GAS_METER < lngcompare Then
: Response = MsgBox(msg, style, title)
: If Response = vbOK Then
: Cancel = True
: End If
: End If
: rs.Close
: Set rs = Nothing
: End Sub

Dec 12 '05 #2

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

Similar topics

1
1556
by: Razzbar | last post by:
I'm creating a site that is all on one page. The navigation of the site is enabled by a hidden iframe that fetches content from the server and re/places it in a div on the page. The problem is how to allow visitors to bookmark "pages" when the page is dynamic. I can use Apache-style pseudo-urls to parse out the location of the dynamic...
1
1496
by: Lumpierbritches | last post by:
Thank you in advance for all of your patience and assistance. It is greatly appreciated. I know there's a way to bookmark a record in code, but for the life of me can't remember it, nor can I find it on Google. Anyone help with this simple problem? I want to be able to navigate away from my form, close it and when I'm done in the open...
3
1406
by: vMike | last post by:
Is there a way to adjust the url of the bookmark value when someone wants to bookmark a page. When a user tries to bookmark a page they get the non-postback state of the page. I can use code to handle a querystring request to get the user to the page they are want to bookmark (ex: an item they want to purchase). Is there a header or other...
2
1857
by: chazmanian | last post by:
We have some link buttons that allow the user to "view" a PDF file. That is, the link runs server-side code that generates the virtual path to the PDF file in question and then does a Response.Redirect to the file The problem is, when the file is opened via a combination of IE and Adobe Acrobat, there is nothing to prevent the user from...
0
1012
by: B. Jenkins | last post by:
Up until now, I've had no problems rendering a named anchor and having javascript scroll to a bookmark on a page (using window.location.href=# property setting), but I have reached a page where the page does not scroll to the bookmark. I'm using ASP.Net 1.1 SP1. Are there any known limitations to using bookmarks in IE 6? The page I am...
3
1217
by: Grumps | last post by:
Im trying to build a bookmarking feature with ajax and everything has work until i come across the callback problem. document.getElementById during stateChanged Im trying to make possible document.getElementById(id).innerHTML=xmlHttp.responseText as im having multiple div id on my page each page will have 15 mysql result and will be ID...
1
1503
by: =?Utf-8?B?QWxleCBNYWdoZW4=?= | last post by:
When I configure an ASPX Mobile website and I set cookieless Sessions, it results in that key being inserted and passed around from page to page in the URL. This is fine except for one thing: It seems to mean that people cannot bookmark pages because the key field in the URL will not be valid when they use it later. Is there anything I can do...
0
1217
rhitam30111985
by: rhitam30111985 | last post by:
hi there.. i am new to this network and also new to python programming.. i have been assigned the task to figure out how exactly social bookmarking is done but have no idea.. dunno where to start... how sites like del.icio.us work? any suggestions r welcome.. platform used linux2 os: gnome
0
7327
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...
0
7472
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. ...
0
7599
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...
0
5773
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...
1
5168
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...
0
4810
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...
0
3301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
537
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...

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.