473,326 Members | 2,111 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,326 software developers and data experts.

Access FINDandREPLACE Dailog Problem? acCmdFind

Hello

I am having a problem with the (Access FIND and REPLACE dialog).
I want it to operate in FIND mode only. I have set the
AllowEdits/Additons/Deletions
to False in the MainForm and the FIND feature becomes locked in and
works fine, however
the logic of my MainForm include New/Edit/Del buttons that become
visible each time the
next record is displayed. The FIND dialog when it Finds the next
record is subsequently turning these buttons on and this is the problem
because it allows the user to press one, which in turn changes the
AllowEdits mode to True and then allows REPLACE to be made
with the FIND/REPLACE dialog. This I do not want!

The code behind the Command Button is executing beyond my call for
DoCmd.RunCommand acCmdFind, and this is where I'm losing my ability to
control
things. Is there a way to stop the code flow at the acCmdFind to wait
for it to complete?
ThankYou
Greg

Mar 7 '06 #1
3 5106
Hi Greg. AFAIK, there is no way to disable the Replace tab of the Find
dialog in the latest versions of Access.

For this reason (and others), some developers do not expose this dialog to
users. It is not too difficult to create a simple little unbound form you
can use as your own Find box.

The code for your button will pass a reference to the active form, and you
can then identify Form.ActiveControl and read the ControlSource to see what
field you need to search for. You can discover the Type of the field from
Form.RecordsetClone.Fields("MyField") so as to use the right delimter in the
FindFirst to find the record.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<Ap******@gmail.com> wrote in message
news:11**********************@v46g2000cwv.googlegr oups.com...

I am having a problem with the (Access FIND and REPLACE dialog).
I want it to operate in FIND mode only. I have set the
AllowEdits/Additons/Deletions
to False in the MainForm and the FIND feature becomes locked in and
works fine, however
the logic of my MainForm include New/Edit/Del buttons that become
visible each time the
next record is displayed. The FIND dialog when it Finds the next
record is subsequently turning these buttons on and this is the problem
because it allows the user to press one, which in turn changes the
AllowEdits mode to True and then allows REPLACE to be made
with the FIND/REPLACE dialog. This I do not want!

The code behind the Command Button is executing beyond my call for
DoCmd.RunCommand acCmdFind, and this is where I'm losing my ability to
control
things. Is there a way to stop the code flow at the acCmdFind to wait
for it to complete?
ThankYou
Greg

Mar 8 '06 #2
HK
I too would recommend removing the Find/Replace dialog box from the
user if you want good control, as it appears you do. There are many
good options to find records. One of them is a combo. If you need to
search more than one field at a time, or perhaps a different field each
time, this is not that difficult either.

I don't understand enough about what you're trying to do to post code
samples here. Are you searching only one field? Do you need to search
for number, text, or date data? Are you using datasheet view,
continuous form, or single form? Do you need to move to a given record
or just limit the viewable records, based on the search? Tell us what
you were achieving through the find box, perhaps we can give you some
examples. -HK

Mar 8 '06 #3
Hello

ThankYou for the response.

I was hoping to give the user the full flexibility of the Access
Find/Replace
option, but restrict to FIND only. Which is nice because the user can
then
simply point to ANY screen field and search. I was wondering if I
could somehow
place the Find/Replace option in a acDialog or Popup/Modal form called
by a button
in the MainForm and still get it to search the MainForm. When the
search or searches
are complete, then exit the Popup and have the Record of choice
displaying on the
MainForm.

- I have used ComboBox for single field searching, but I wanted all
fields here which
include number/text/ and dates. - I am in Single Form mode. - I just
want to display a single record, based on what the user wants to FIND.

Samples would be great!!! But, again I wonder if I could use a Popup
dialog form of some sort to accomplish the Record FIND, using the
flexibility
of the Find/Replace, but restrict to FIND since the dialog should
freeze the code
and confine the user to only the FIND activity. And of course give the
result in the
Main Form? Is this a good idea? How would I implement it?

THANKYOU Again
Greg
I

Mar 8 '06 #4

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

Similar topics

0
by: ianstratford | last post by:
I just released a new version of the free Microsoft Access find and replace add-in utility (version 1.5). Search and replace (optionally) any string in tables, queries, macros, forms, reports...
7
by: smd | last post by:
Hello and thanks for taking the time to read this. I've looked all over the web and newsgroups and can't find a solution to my problem. I've posted this question to the Access 2000 group as well -...
2
by: Viks | last post by:
Hi everyone, I am beginner at javascript.One of the web applications that i am currently developing,requires to upload file from the client side to the server.The condition being that the file...
1
by: jharikrishna | last post by:
Hi Frnds I am working on c#. I want the information about to click the button in textbox How to Open the file browser dailog.
0
by: batchu rajesh | last post by:
in a vb.net programming i need to keep a color dailog box in a pannel can any one help me how to do
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
2
by: ChillUmesh | last post by:
hi, i've to filter out files without any extension using common dailog control can any one help me out. thnx
5
by: novak | last post by:
hi list, since a couple of weeks we face a special "security" problem. neraly every ms-access database that is located on our net-drives cannot be opened. when clicking the document's icon,...
3
by: premMS143 | last post by:
Hi, I' developing a VB application. When user clicks on 'Tools' option from the Main Form, a dailog box will appear, which is developed using another VB form itself. But while the dailog box is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.