473,408 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Disable Replace in Search and Replace Command Button

22
I created a command button using the record navigation feature, find record. Does anyone know how to turn off the functionality of the "replace" tab that gives the user the ability to replace the data in a table? I would like to give the user the ability to search and recall a record with the search feature in order to locate a record for editing; however, I do not want them to have the ability to replace any data. Any information would be greatly appreciated. Thanks!!
Jul 17 '07 #1
13 6130
Ciara9
22
Sorry but forgot to mention that I am placing this on a form and using the 2003 version. Thanks again.
Jul 18 '07 #2
nico5038
3,080 Expert 2GB
In general I present the users a datasheet subform where they can use the right-click pop-up for filtering and selecting the row the need.
The datasheet can be made "read-only". Besides the datasheet I have the action buttons ADD, UPDATE and DELETE to allow the basic operation.

Gues that will fit your needs. Check for the right-click popup possibilities:
http://www.geocities.com/nico5038/xR...nstruction.zip
and for a datasheet sample:
http://www.geocities.com/nico5038/xS...tAction-97.zip

Nic;o)
Jul 18 '07 #3
missinglinq
3,532 Expert 2GB
I'm sorry, but this statement doesn't make sense!

"I would like to give the user the ability to search and recall a record with the search feature in order to locate a record for editing; however, I do not want them to have the ability to replace any data."

How do you edit a record without replacing any data?

Linq ;0)>
Jul 18 '07 #4
Ciara9
22
Thanks for the feedback and information.

Sorry, it's hard communicating when you are typing sometimes. :)

What I am trying to achieve is the ability to search for a record in a table on the same form where the data is entered. Once the record is retrieved, then I would like for the user to change the data by accessing the fields on the form. I am afraid if they use the replace feature, then they may globally change many records simultaneously when they should be only be changing the fields of one record at a time. I hope that makes more sense.
Jul 19 '07 #5
missinglinq
3,532 Expert 2GB
Is the field you're searching on unique, i.e. is there only one record that will match the criteria?

Linq ;0)>
Jul 19 '07 #6
Ciara9
22
What I would like for them to search for would be only one field and unique; however, the search and replace functionality appears to be pretty much open to all fields. From experimenting with it, whatever field you click on prior to pressing the search button is the area it filters for on the entire table. That's why I wanted to at least turn off the replace capability and force changes thru the fields on the form.
Jul 19 '07 #7
puppydogbuddy
1,923 Expert 1GB
What I would like for them to search for would be only one field and unique; however, the search and replace functionality appears to be pretty much open to all fields. From experimenting with it, whatever field you click on prior to pressing the search button is the area it filters for on the entire table. That's why I wanted to at least turn off the replace capability and force changes thru the fields on the form.
Pictures are worth a thousand words. See these links for HowTO's

Search form using a textbox as a search field
http://www.databasedev.co.uk/text_search.html

Search form using a listbox as the search field:
http://www.databasedev.co.uk/list_box_searching.html
Jul 19 '07 #8
Ciara9
22
Thank you. I will check it out.
Jul 19 '07 #9
missinglinq
3,532 Expert 2GB
I think pdb has the right idea; you need to utilize a custom search routine rather than using the native Find & Replace feature. I've seen a modification done on the feature in the past, but the problem, if I remember correctly, is that it involved using the SendKeys function, which is notoriously unstable!

Linq ;0)>
Jul 19 '07 #10
Ciara9
22
Thanks for the info. I was wondering if this was a viable option. :)
Jul 19 '07 #11
ADezii
8,834 Expert 8TB
Thanks for the info. I was wondering if this was a viable option. :)
I'm pretty sure that the native Find and Replace Dialog provided by Access cannot be modified in any manner, such as removing the Replace Tab. There were some very good alternatives listed which you should take a serious look at.
Jul 26 '07 #12
missinglinq
3,532 Expert 2GB
The only way to disable the Replace feature is to make the form either read only or to set AllowEdits to False.
Jul 27 '07 #13
Turn this:
_______ . _______
| Find . . .\ | Replace \
| . . . . . . . ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
| . . . . . . . . . . . _______________
| .Find What: .| . . . . . . . . . . . . . . . |
| . . . . . . . . . . . ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

To this:
_______
| Find . . .\
| . . . . . . . ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
| . . . . . . . . . . . _______________
| .Find What: .| . . . . . . . . . . . . . . . |
| . . . . . . . . . . . ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

By turning this:
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdSearch_Click()
  2. On Error GoTo Err_cmdSearch_Click
  3.  
  4.     Screen.PreviousControl.SetFocus
  5.     DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
  6.  
  7. Exit_cmdSearch_Click:
  8.     Exit Sub
  9.  
  10. Err_cmdSearch_Click:
  11.     MsgBox Err.Description
  12.     Resume Exit_cmdSearch_Click
  13.  
  14. End Sub
Into this:
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdSearch_Click()
  2. On Error GoTo Err_cmdSearch_Click
  3.  
  4.     Screen.PreviousControl.SetFocus
  5.     Me.AllowEdits = False
  6.     DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
  7.     Me.AllowEdits = True
  8.  
  9. Exit_cmdSearch_Click:
  10.     Exit Sub
  11.  
  12. Err_cmdSearch_Click:
  13.     MsgBox Err.Description
  14.     Resume Exit_cmdSearch_Click
  15.  
  16. End Sub
Dec 9 '11 #14

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

Similar topics

6
by: nntp | last post by:
I have a set of links which I want search engines to crawl them, but I want to disable them from my visitors, so I will ask the link owners to pay me to let me enable them. <a disabled...
3
by: jj | last post by:
Hi NG I have a form, where I can activate the search and replace dialogbox when pressing a button. My problem is that the dialogbox opens with the default that it should search for full match...
16
by: MLH | last post by:
In Access 97 and Access 2.0 applications, if a command button has the focus, the spacebar will 'PRESS" the key. How does one go about disabling this annoying BEATURE?
2
by: nicholas | last post by:
How can I disable the enter key on an asp.net page? As the default button is the first on the page, and as the enter key clicks the default button, and as my first button on the page is th...
3
by: Paul | last post by:
Hi, just wondering if there is a way to disable the back button of the browser as I have a logoff page and would like to not allow the back operation? Guessing there may be a way to do it through...
4
by: Patrick Flaherty | last post by:
Hi, Experienced programmer but new to PHP. Moreover I'm to use PHP with Xoops on top (this adds object orientation?). I don't seem to find a xoops Usenet group? Whatever the case (and...
1
by: keithb | last post by:
I have a GridView control that has a delete button (hyperlink) in one column. The datasource table contains a column that has a true/false indicator showing whether or not the record can be...
6
by: sspost | last post by:
how can i disable the back button for a browser? I have been reading a lot of forums but cant find any answer to it...other than opening up the page, in which i want to disable the browser in a...
0
by: JamesOo | last post by:
I have the code below, but I need to make it searchable in query table, below code only allowed seach the table which in show mdb only. (i.e. have 3 table, but only can search either one only,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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...
0
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
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...
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
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
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...

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.