Hi!
My problem is basically in a search modal window, where the user is allowed
to make a selection on which option to take. After selecting an option and
then giving the data to search, the user clicks the "OK" button and the user
gets taken back to the "Customer" form with the correct searched record.
The function works fine except that every now and then it takes 3-5 seconds
to close the search modal window and goes back to the "Customer" form after
clicking the "OK" button
Below is the actual code for the "OK" button:
- - - - - - - - - - - - - - - - - - - - - - -
On Error GoTo OK_Click_Err
If IsNull(Forms![yCustomer Search Dialog]![By Search Type]) Then
Response = MsgBox("You Did Not Select a Record to Search For", 32, "No
Record Selected")
Else
DoCmd.SelectObj ect A_FORM, "Customers"
Forms![Customers]![Customer Number].SetFocus
DoCmd.FindRecor d [Forms]![yCustomer Search Dialog]![By Search Type],
A_ENTIRE, False, A_DOWN, False, A_CURRENT
Select Case Me.Type_of_Sear ch
Case 1
Forms![Customers]![CustomerSubFrm].Form![First Name].SetFocus
Case 2
Forms![Customers]![CustomerSubFrm].Form![Company].SetFocus
Case 3
Forms![Customers]![Customer Number].SetFocus
Case 4
Forms![Customers]![CustomerSubFrm].Form![Phone].SetFocus
End Select
DoCmd.Close A_FORM, "yCustomer Search Dialog"
End If
Exit Sub
OK_Click_Err:
MsgBox "Error is " & Error$ & Chr(13) & Chr(10) & "In yCust Search
OK_Button" & Chr(13) & Chr(10) & CPBSMSG, 16
Exit Sub
- - - - - - - - - - - - - - - - - - - - - - -
Aside from using "DoCmd.FindReco rd" command, are there other ways to find a
record that is faster?
I have a couple of ideas but what I am asking are the ways to do it in
Access and not in MS SQL.
Using the "DoCmd.FindReco rd" command seems to be slow every now and then.
It takes 3 to 5 seconds sometimes to execute.
But if you see another cause, in the code, that slows down the performance,
please let me know.
Thanks,
Ben 0 6601 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: seeker52 |
last post by:
When I use findrecord the record found appears at the bottom of the
datasheet. Is there a way to force it to appear in the middle of the
sheet.
seeker53
|
by: Tony Williams |
last post by:
I have two forms, frma and frmb, both are for inputting new records and are
based on a table, tblmonth, both have two controls, txtmonth and
txtmonthlabela which are based on the fields in the table.
frma has a command button that opens frmb. I want the command buuton to pass
the value of txtmonth and txtmonthlabela from frma to the controls on frmb
I am using this code on the command button on frma:
Private Sub cmdOpenform_Click()
On...
|
by: Doug W. |
last post by:
I want to merge just one record from a query in my Access database into
a Word document. This allows me to send one letter to one client by
first extracting the client's address data, personal data, business
data, and the like.
I get the entire query into the active word document with
..OpenDataSource in a VBA macro.
However, when I try to limit this to one record, the following VBA code
does not work:
|
by: tehgreatmg |
last post by:
Ok what I have is a list of boxes on a form that are connected to fields in my database. There is an extra box I want to be able to put the record number in and it automatically load the data corresponding to that record in the associated boxes. When I have the form running I can go to the editmenu in access and use find(ctrl+f) type in the number and it works. I know it has something to do with the DoCmd.FindRecord ...
|
by: jasone |
last post by:
Hi,
A section of my database allows users to delete items from a table, there is only one collumn in the table, this contains module information(parts of a manufacturing line) due to the lines regulary changing i added a section to delete modules. so far ive got the combo box which selects the modules from a table using a select query, when a specific module is selected i need it to be deleted.
the problem im having is when the delete...
| |
by: RAG2007 |
last post by:
Hi
Having some problems with docmd.findrecord, getting runtime error 2162, in an adp, sql server back end.
On my main form, I have a continuous view subform giving a list of subrecords within the main record. Double clicking on the subrecord changes the subform to a form that gives more detailed information on that specific subrecord. I've been trying to use docmd.findrecord to pull up the info, but I'm getting nowhere.
Here's my code:
...
|
by: Bobby |
last post by:
Hi
Can anybody tell me why the VBA code below works fine in Access 2003
but doesn't work in Access 2007? I do not get any error message, even
if I put a deliberate error into the code. Also, if I put a debug
break point in the code, nothing happens. If I add the line msgbox
"ok" it displays the message box, so I know that it is reading the
code. This is a frightening problem, because if this doesn't display
errors, then what other bits of...
|
by: beemomo |
last post by:
Hi, I have a single form - Customers and I wish to find out all the records which satisfied the value selected from combo box.
Private Sub cboFindFirstName_AfterUpdate()
DoCmd.ShowAllRecords
Me!ContactFirstName.SetFocus
DoCmd.FindRecord Me!cboFindFirstName
'Set value of combo box equal to an empty string
Me!cboFindFirstName.Value = ""
|
by: internetintern |
last post by:
hello,
I have a code like:
Private sub button1_Click()
DoCmd.FindRecord Me.fieldname.Value, acStart, , acSearchAll, , , False
end sub
but the problem is that the command stops searching at the last record. so the records before the current record are not searched. I thought with acSearchAll it should search the entire record list.
|
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 usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |