Right To Left Search/ Find Last Instance

Feb 20, 2006

Hi all,

I have some records containing the following data

ABC (UK)
ABC (UK) Ltd
ABC UK) Ltd
ABC UK)

I need to pull out all the data with a ) but not a ( and add a ( to the start of the word before the ).

So for example, the four examples above would change to:

ABC (UK)
ABC (UK) Ltd
ABC (UK) Ltd
ABC (UK)

I have selected the companies that need updating, and I can pull the data to the left of the ), but I don't know how to find the first instance from right to left of " ", or find the last instance from left to right of " ".

Can anyone help?

Thanks.

View Replies


ADVERTISEMENT

Find Numbers To Left And Right Of Decimal

Feb 25, 2008

Hi all

I need to break up a decimal number into 2 parts (ie numbers to the left and numbers to the right of the dcimal place)

Lets say the number is 12.35

I'd like a=12 and b=35.

Any ideas how I could do this??

Thanks

View 2 Replies View Related

Search Or Find?

Jan 28, 2005

i have a table with the following fields.
Customer
Rig
Vessel0
Vessel0serial
Vessel1
Vessel1serial

How can i do a search for a particular vessel when every customer will have two of them?

Thanks,
Tim

View 3 Replies View Related

Problems With Find/search

Sep 20, 2006

Hi, i am relatively new to Access, I have Access 2002.

I have created a contacts form but have a problem when i click on the find button. I click on this to try and search for a companies contact information and the following happens:

I get a box appear saying.
Compile error, Variable not defined.


Underneath the error message the following is displayed and highlighted yellow:


Private Sub cmdFind_Click()
'Flag1 and Flag2 are Global variables
On Error Resume Next
Screen.PreviousControl.SetFocus
If Screen.ActiveControl.ControlType = acComboBox Then
DoCmd.OpenForm "frmFind", , , , , acDialog, Me.Name & "^" & Screen.ActiveControl.Name & "^" & Screen.ActiveControl.RowSource
'Flags are set by frmFind
Select Case Flag1
Case "FindFirst"
DoCmd.FindRecord Flag2
Case "FindNext"
DoCmd.FindNext
End Select
Else
RunCommand acCmdFind
End If
End Sub


Any help would be greatly appreciated, i have tried using the help option but it doesnt help me.

Please can someone help me????

Thanks
emma

View 2 Replies View Related

Search Or Find Current Customers

Jul 8, 2006

Hi,
I have 3 tables
Customers
Tranasaction
Items

Linked togather, working fine.

Now I have setup one form where i enter each transaction details

Item details, customer details and transaction details

I would like create customer find function, which will check current records for that customer account no, if customer account does not exist then form will let me create a new customer.

can anyone please tell me how can i do that . thanks
I tried using combo box, but shows me record but does not let me enter new customer account no.

thanks in advance : )

View 1 Replies View Related

Ms Access Search/find Command Button??

Oct 29, 2004

I have a MS Access database, and I have set up a form for users to input

name, address, ssn and other data. I have command buttons on the form

to print a record, add a record, delete a record and to exit. I tried the

search option, but with 50k records on a netwoek, it was to slow.

Is there a way to have a search on a command button, (Macro?) on

this form to allow our employees to search by name or ssn?

Thanks for your help.

View 5 Replies View Related

Creating A Search To Find Nearest Location

May 12, 2014

I have Territory Mgmt database. Sometimes when I get a new lead I need to quickly find other leads in the database that are closest to it.

I am currently not tracking latitude/longitude etc. Do I need to? Is there a way to set certain location marks by address?

If so, once I put in the latitudel/longitude how do I create a search to find the nearest?

View 14 Replies View Related

Queries :: Search Many To Many Relationships To Find Single Record

May 22, 2013

I am trying to use a query to search 2 many to many relationships but i keep getting duplicate results because each record is slightly different.

I have a table with cameras, another users and another formats. I have a table linking cameras to users and another linking cameras to formats so it looks somthing like this:

tblCameras - tblFormatlink - tblFormats
tblcameras - tblUserslink - tblUsers

When i add all the tables into a query i get loads of results as expected because i get a result for every possible combination.

What i want is when i search for all cameras that are suitable for a user who is a beginner is to get just a list of unique cameras. When i do that search at the moment i get a duplicate record for each different format the camera can do.

View 4 Replies View Related

Find Command In Access In One Report To Search Throughout Whole Database

Dec 7, 2014

Is there a way to use the find command in access in one report to search throughout the whole database. For instance, I am designing a database that in a report it shows the number identifier of an item, and the actual detailed information is located in a separate form. What I want it to do is to be able to find the detailed information from a command within the report that only has the number identifier.

View 2 Replies View Related

Forms :: Search Text Box For Specific Word - Find Option

Sep 18, 2013

I have 5 textboxes and a multiline textbox in a form in my Access Database. I am going to type several keywords in those textboxes and I am going to type an article in the multiline textbox.

What I need to do is I want to calculate the keyword density in the article. I can do that if i know how to search the whole text in the article and count the specific word. And I want a function to count all the words in the article too.

View 1 Replies View Related

Modules & VBA :: Input Box Search - Find A Record In Main Form

Jun 5, 2014

Input box Search problem. I have been using the following to find a record in my frmMain using an Input Box:

Private Sub cmdClientIdSearch_Click()
'Searches for Client by ID number
Dim rs As Object
Dim strCriteria As String
strCriteria = InputBox("Please enter Client ID" & vbCr & "Do not type leading zeros")

[Code] ....

It works great if I run it from a command button from frmMain. But, if frmMain is open and I run it from a command button on my switchboard, I get the following error message:

Run Time error 7951. You entered an expression that has an invalid reference to the Recordset Clone Property. I tried inserting a command to open frmMain in the first line, even before the two Dim statements, but I get the same result.

View 6 Replies View Related

Find And Replace Search Giving Either Ascending Or Descending Results

Dec 21, 2014

I have a DB and I have a button that triggers the find and replace. this will search over 100K entries and filter a specific client. The clients record can be 100's of entries.

This all works fine, but its always ascending and I have to scroll to the bottom for the latest record.

I can't set it to show Descending permanently as some employees can't cope with change. so...

I have a checkbox on my form for either Ascending or descending results. Is there any way I can get the find / replace to reference it, Or can I re-sort them after the search.

I've tried putting re-sort code on the 'find' button as lostfocus and mouseup but it doesn't work.

View 6 Replies View Related

Queries :: Keyword Search - Find Field Names Of True Checkboxes

Jul 10, 2013

I've recently finished constructing a database that uses forms with checkboxes i.e. when a user opens a form there are several checkboxes associated with labels, but the table only stores the check-boxes and the form labels are the field (column) names on the table.

Now, what I'm trying to do is create a search feature whereby if a keyword search is conducted, a search through the column names from the table with checkboxes takes place and only lines (rows) with true (checked) checkboxes are returned.

View 12 Replies View Related

Modules & VBA :: Search SubDirectory - Find And Open A Folder Based On Text Box

Sep 8, 2014

I am 2 years into my database. I am trying to find and open a folder based on a text box. The problem is folder could be in many sub folders which is hold on our J: drive.

To further complicate, the folder i am searching may not be exactly as the text box states.

EG. Text box could say 123456 however the folder could be called M123456 etc.

How do i locate a folder or subfolder and open it based on part of a text box...

View 3 Replies View Related

Tables :: Find Record Button Added To A Form To Adjust Search Function

Apr 6, 2015

Is it possible on the Find Record button added to a form to adjust the search function so it defaults to a specific box on the form? I have a form for tracking employee's and on my Find Record button I would like it to default to the Last name instead of the Record number.

View 3 Replies View Related

Modules & VBA :: Unable To Search A String Within Subform To Find Information Stored On Main Form

Dec 2, 2013

I'm trying to search a for string within a subform to find information stored on the mainform to which the particular subform belongs.

The problem is that the subform is generated from a query which uses a number from the main form to generate.

So the subform record is only generated when the correct mainform record associated with it is loaded.

Now to solve my problem I've made a new query that brings up ALL the results that could be generated by the main form and from that I can search to find my search term I'm after and read off the ID number to tie it back to the mainform.

But all of this is done manually, I want a way to do all this using VBA in a way that the user can't edit any records as they are doing it.

View 3 Replies View Related

What To Use In This Instance

Mar 21, 2005

Hi,

I have a form(frmentry) where a user creates a record and it has a primary key that is entered manually the primary field is called "AR_Number". The user enters the details in this form and then click a button called "butapprove" and it launches another form called 'frmentryapproval'. When this second form loads up i need it to be on the record that the user was just entering, wondering what the best way is to load that record into the form.

currently I am using this code:
Private Sub butapproval_Click()
Dim appformname As String
Dim apparnumber As String

appformname = "frmentryapproval"
apparnumber = "[AR_Number]=" & Me![ARNo]
DoCmd.OpenForm appformname, , , apparnumber
End Sub

but when using that it does not work properly and the values entered on the 2nd form are not saved at all, let alone to the required record.

I have seen some things on GoToRecord & FindRecord but don't know how to use them, would the be useful in this situation?

Thanks for your help and sorry for the n00b question.

Ryan

View 11 Replies View Related

Need Current And Next Instance Of A Job

Jul 6, 2005

Hi,

I have around 50 jobs on a table. These have a 'start date' of various dates in a year. A field called 'complete' indicates whether a job has been closed off or not and a field called 'frequency' determines how often the jobs recurr (in days).

I need a query (which I'll run every night) which will examine all the incomplete jobs on the table and copy all this data to new jobs and change the 'start date' to the previous 'start date' + 'frequency'.

That in itself is not the problem. My problem is how to tell Access that when the current and next instances of a job exist, not to copy it a third time.

In other words, after the query runs there should always be 2 instances of the job on the table...current and next.

Can someone please advise me what I should do?!

Thanks in advance

View 2 Replies View Related

Selecting One Instance

Dec 16, 2005

Hi guys,

Still trying to get used to this Access lark.

A table contains a column with numbers i.e - 1,1,3,4,2,2,2,3,4,4

If i just want a query that shows one of each i.e - 1,2,3,4

what do i need in the criteria line?

Thanks in advance

View 2 Replies View Related

Hwo To Refer To A Form Instance

Feb 17, 2005

I'm sure this is simple, but I can't find it anywhere...

How do I refer to an instance of a form using its key value?

For example, I have a collection 'colForms' and two forms in that collection with the keys 'Key1' and 'Key2'. How do I refer to the instance that has Key1 in code (for exampe, to close or requery the Key1 instance of the form from another form)?

Thanks in advance,
David
dminstance

View 1 Replies View Related

Forms :: Allow Only One Instance Of Value In Table

Jul 31, 2014

I am trying to ONLY allow One instance of a value in my table.

tblUserSecurity
admn
dev

If either of these exist (They are Yes/No) then do not allow. This is being checked via a combo box on my form using the after update event. Only One Administrator and One Developer. DCount or DLookup ?

View 14 Replies View Related

Forms :: Creating Instance Of A Recipe?

Apr 15, 2014

I'm making a database that keeps track of particular lots of ingredients going into certain recipes.

The relevant tables are
tblSupplements (SupplementID, SupplementName)
tblSupplementLots (LotID, SupplementID, ArrivalDate)
tblRecipes (RecipeID, RecipeName)
tblRecipeItems(RecipeID, SupplementID, Quantity)
tblSupplementRecipeBatches (BatchID, RecipeID, MixingDate)
tblSupplementRecipeBatchItems(BatchID,LotID)

I have the top 4 tables filled out via forms and it all works swimmingly.
I'm having a hard time coming up with a scheme for filling out the bottom two.

I would like to have a form which will display the BatchID (automatically generated), allows the user to enter the MixingDate, gives a combobox bound to RecipeID which is filled from a pulldown menu based on RecipeID and RecipeName from tblRecipes.

All these I can do, but the next step is befuddling me: based on the RecipeID, I need to make a list consisting of the varying number of supplements which comprise the given recipe and allow the user to enter the LotID for each one (preferably from a pulldown menu).

I've tried a bunch of things (subforms linked on RecipeID, listboxes, VBA update queries attached to buttons). I just can't seem to understand how to have a variable number of subrecords appear and attach a new field (LotID) to each. Perhaps my table design is awkward?

View 2 Replies View Related

How To Open Multi Instance Form

Oct 21, 2013

I need to open multi instance form.

1) i have a table (SQL) "ActiveForm" which contains various fields including a field called "FormName" (Varchar (30)).

2) in the access form called "Menu" i place a treeview control and when i "click" in the node, i read the table rsProcedure="SELECT .* FROM ActiveForm WHERE Active=true";

3) Dim Istanzaform As Integer
Dim dbs As Object
Dim myFrm As AccessObject
rsProcedure.MoveFirst
rsProcedure.Find "DescrizioneForm = '" & Node.Text & "'", , adSearchForward

[Code] ....

View 4 Replies View Related

New Form Instance - Suppress Record Retrieval?

Mar 11, 2005

Hi,

I build the WHERE clause in my form's record source dynamically, depending on the context in which the user opens the form. I can't put the WHERE predicates in the record source and refer to fields on another form, as the context will determine which predicates are required. So I have code like this:

Public gf_FormInstance As Form
Dim strSelect as String
:
Set gf_FormInstance = New Form_F_PerformanceSummary
:
gf_FormInstance.RecordSource = strSelect
gf_FormInstance.Refresh
gf_FormInstance.Visible = True

The problem is, the Set statement causes the New form instance to retrieve all records from the existing record source, slowing down the performance.

I'd like to find a trick to suppress the retrieval of records when the Set statement executes, and then allow them to retrieve when the Refresh statement executes.

Any suggestions would be much appreciated.

Thanks,
Keith.

View 2 Replies View Related

Modules & VBA :: Excel Instance Does Not Close From Access

Oct 4, 2013

I have two problems excel instance does not close at the end and two when I try to do the looking using text it works but soon as I try using date/time it returns nothing.

Code:
Private Sub Command84_Click()
Dim objExcel As Excel.Application
On Error Resume Next

[Code].....

View 11 Replies View Related

Modules & VBA :: InStr (3rd Instance Of Character Required)

May 1, 2014

I use the following code to get the first and second instances of a "/" character. How to get the position of the third instance.

iUPC = "123-7754LF-(A/S red Top)-T19/97876564"
'get number of instances
xTimes = 0
xTimes = Len(iUPC) - Len(Replace(iUPC, "/", ""))
'get position of characters
xInstance1 = InStr(1, iUPC, "/")
xInstance2 = InStr(InStr(1, iUPC, "/") + 1, iUPC, "/")

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved