473,466 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Making record inactive

1 New Member
I need to keep every record that a user deletes, but set it's status to inactive. I have done this, but now when the user marks this record inactive, how can I refresh the form (I am filtering to view only "active"), but capture the bookmark of the previous record, so that record displays, not the first record in the recordset?
Oct 15 '07 #1
1 2598
missinglinq
3,532 Recognized Expert Specialist
I do a similar thing in an app I'm working on, and this works for me:

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdDeleteRecord_Click()
  2. Dim bk As String
  3.  
  4.   If CurrentRecord <> 1 Then
  5.  
  6.  DoCmd.GoToRecord , , acPrevious
  7.  
  8.     bk = Me.Bookmark
  9.  
  10.     DoCmd.GoToRecord , , acNext
  11.  
  12.     'Place your code to mark record inactiver here
  13.  
  14.     Me.Requery
  15.     Me.Bookmark = bk
  16.  
  17.   Exit Sub
  18.  
  19.   Else
  20.    'Place your code to mark record inactiver here
  21.     Me.Requery
  22. End If
  23. End Sub
  24.  
Welcome to TheScripts!

Linq ;0)>
Oct 15 '07 #2

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

Similar topics

1
by: kufre | last post by:
I need some help. How can I automatically fill my combo box in a new record with data from previous similar record. My form has a option group button with two check box. What I'm trying to do is...
5
by: Ross A. Finlayson | last post by:
Hi, I'm scratching together an Access database. The development box is Office 95, the deployment box Office 2003. So anyways I am griping about forms and global variables. Say for example...
8
by: Komandur Kannan | last post by:
We have a smart device application running on handhelds(Symbol MC9000G). The backend is Oracle and a middle tier web services development done in Vb.net. We use pessimistic Locking due to...
0
by: Spencer Lee | last post by:
I have encountered a very unique problem (for me): I created a data access page, with 3 levels of groups. I put the file on the web folder (intranet), and it seems like everything is working...
1
by: Akinyemi | last post by:
I am developing a payroll program.. The data generated will be saved in an Access Database. I want a situation whereby when an employee leaves the organization or retires, instead of deleting his...
4
by: msilva10 | last post by:
In my application I have a table called Tenant and I have another table called Leases. As I add a new Lease to a Tenant I have a Yes/No Field that defaults to yes when I add a new Lease. But I need...
5
by: ladybug76 | last post by:
Hi. I'm working on a database and I though I tinker with Macros and VB, I am not very versed in them. So ANY help would be HUGELY appreciated!!! (I'm using Access 2003) What I need to do...
1
by: matrix1405 | last post by:
I need to be able to have all fields in a record to be "inactive" once a date is put into a field. So that when I pull reports that those records are not included in my database anymore. Can anyone...
2
by: Arnold | last post by:
Hi Gurus, I am getting the error 3420 "object invalid or no longer set" at in the line -- rst.FindFirst "=" & NextPK --in the code below. I simply have a continuous main form that is, by...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
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
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
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
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,...
0
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
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 ...

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.