Removing Parentheses And Its Contents From Access Table Field

Jun 18, 2014

I am very new to access less than 1 week since i started trying to build an horse racing database, i am trying to link data from 2 different sources via the horses name however one source displays this with the horses country of origin in parenthesis foe example FRANKEL(GB) and the other source displays the name as just FRANKEL, to be honest i haven't yet tried the link but guess it will fail.

I am therefore looking to get rid of the parentheses and their contents from an access table field and create another field without them.

In Excel i use the formula B1:

=TRIM(REPLACE(A1,FIND("(",A1&"("),FIND(")",A1&")")-(FIND("(",A1&"(")-1),"")) and that works fine.

I guessed the solution for Access would be newname:

TRIM(REPLACE([frhorse.NAME],FIND("(",[frhorse.NAME]&"("),FIND(")",[frhorse.NAME]&")")-(FIND("(",[frhorse.NAME]&"(")-1),""))

But this doesn't work as in returns undefined function "FIND" in expression error.

View Replies


ADVERTISEMENT

Modules & VBA :: Code To Check Contents Of A Field In A Table Where Another Field

Sep 11, 2013

I am trying create some code that checks if the contents of the status field in a table is "Authorised" where the ID = something specific for multiple records. If all records witht the specific ID are "Authorised" Then generate a new record in another table. Where to start, perhaps a Dlookup?

View 1 Replies View Related

Queries :: Querying Contents Of One Field Against Another Table / Field

Apr 26, 2013

I am trying to perform a search function query in access but am having trouble. I have two tables. One table has a column in which I need to search the contents of this field by referencing data in another field/table. I am able to write the query searching the data manually (not referencing the other table) but can't seem to get the query right when referencing the other table!

this query works =
SELECT *
FROM Sample_Data
WHERE (((Sample_Data.[Affected_Frequencies]) Like "*451.425*" Or (Sample_Data.[Affected_Frequencies]) Like "*451.400*"));

but, i put together a frequency table (Table name = Frequencies) and the column within that I am searching for is called Frequency. im trying to reference Frequencies.Frequency using a LIKE statement.

View 1 Replies View Related

Modules & VBA :: Using Contents Of MS Access Table?

Feb 14, 2014

I would like to ask if it is possible to use the contents of a table as a comparator? For example, I have this column in my table that has the schedules of the professor, if the professor for example failed to login within fifteen minutes after his/her supposed start of class a message will be displayed on the screen notifying that the professor has not yet logged in.

View 1 Replies View Related

Put Contents Of Field Off Table On Report Based On Date

May 24, 2012

I have fairly large table called QBInvoices that consist two fields- qbinv and date . Also, I have a report that showing info off query called TotalQueryQB. The table and query have no relations except dates . I need to show on report filed qbinv off table QBInvocies on the top of the reprot based on date. The user type date on form -frmQB text box txt Date and I would like to have contest of field qbinv off table QBInvocies on the top of the report base on date that was typed.

View 2 Replies View Related

Creating A Table Of Contents / Index / Need Macro To Create A Field

Apr 4, 2014

I have a situation where I have a report which I will generate to print our companies pricebook. I need an index/table of contents for customers to go to the page where a product is to look up prices. The problem is that we add and subtract products on a consistent basis.

So a new product will get added, but of course, to run alphabetically, there's no way to insert it, then renumber the pages for it to be easily found.to use a maketable query, which sorts all of the products alphabetically. Each time it is run, it will delete the previous table. I then need to have an autonumber field created to create my "page numbers". Yes, each time the pricebook is run, products can and will oftentimes get new page numbers.

So my thought is to have a macro run which creates the autonumber field to the table. This will then be the basis for the form, which will in turn utilize the "page number"/autonumber field to both serve as page numbers in the report. And of course, the table which is created each time will be the "table of contents".

View 5 Replies View Related

Contents Of A Field Based On The Contents Of Another Field

Jul 14, 2006

Hi,
I'm making a form where the contents of a field is determined on the contents of another field in another form. I thought an IIF function would work, but when I tried it the contents says #NAME.

I put it in the control source.

IIF([Forms]![Frm_NewBusiness]![Page4]![Child51]="NTU",NewBusiness_Date_Issued="NTU",NewBusiness_Date_Issued)

Any ideas?

Cheers,
Ben

View 1 Replies View Related

Parentheses Problem

Feb 1, 2006

The following query works, I'm just wanting to add a date parameter (below)...When I add the data parameter it seems to ignore that criteria.

I just want to add this:
Event_Date Between [Enter Start Date mm/dd/yyyy] And [Enter End Date mm/dd/yyyy]


WHERE (((tblContacts_Speakers.Contact_Fname)=[FORMS]![frmFirstLast_Name]![txtFname]) AND ((tblContacts_Speakers.Contact_Lname)=[FORMS]![frmFirstLast_Name]![txtLname])) OR (((tblContacts_Speakers_1.Contact_Fname)=[FORMS]![frmFirstLast_Name]![txtFname]) AND ((tblContacts_Speakers_1.Contact_Lname)=[FORMS]![frmFirstLast_Name]![txtLname])) OR (((tblContacts_Speakers_2.Contact_Fname)=[FORMS]![frmFirstLast_Name]![txtFname]) AND ((tblContacts_Speakers_2.Contact_Lname)=[FORMS]![frmFirstLast_Name]![txtLname])) OR (((tblContacts_Speakers_3.Contact_Fname)=[FORMS]![frmFirstLast_Name]![txtFname]) AND ((tblContacts_Speakers_3.Contact_Lname)=[FORMS]![frmFirstLast_Name]![txtLname])) OR (((tblContacts_Speakers_4.Contact_Fname)=[FORMS]![frmFirstLast_Name]![txtFname]) AND ((tblContacts_Speakers_4.Contact_Lname)=[FORMS]![frmFirstLast_Name]![txtLname])) OR (((tblContacts_Speakers_5.Contact_Fname)=[FORMS]![frmFirstLast_Name]![txtFname]) AND ((tblContacts_Speakers_5.Contact_Lname)=[FORMS]![frmFirstLast_Name]![txtLname])) OR (((tblContacts_Speakers_6.Contact_Fname)=[FORMS]![frmFirstLast_Name]![txtFname]) AND ((tblContacts_Speakers_6.Contact_Lname)=[FORMS]![frmFirstLast_Name]![txtLname])) OR (((tblContacts_Speakers_7.Contact_Fname)=[FORMS]![frmFirstLast_Name]![txtFname]) AND ((tblContacts_Speakers_7.Contact_Lname)=[FORMS]![frmFirstLast_Name]![txtLname])) OR (((tblContacts_Speakers_8.Contact_Fname)=[FORMS]![frmFirstLast_Name]![txtFname]) AND ((tblContacts_Speakers_8.Contact_Lname)=[FORMS]![frmFirstLast_Name]![txtLname])) OR (((tblContacts_Speakers_9.Contact_Fname)=[FORMS]![frmFirstLast_Name]![txtFname]) AND ((tblContacts_Speakers_9.Contact_Lname)=[FORMS]![frmFirstLast_Name]![txtLname]));

View 1 Replies View Related

Extract Text Between Parentheses

Sep 12, 2007

I have an expression below that I am trying to use to extract text from within parentheses in a field, but it is leaving the last ")" on the extracted text. Can anyone help me determine what I need to do to just return the text? Thanks.

The length of the field is 100.

Mid([SIDE_DRUG_DESC],InStr(1,[SIDE_DRUG_DESC],"(",1)+1,Len([SIDE_DRUG_DESC])-(InStr(1,[SIDE_DRUG_DESC],"(",1)+1))

View 3 Replies View Related

Text Calculations / Literal Parentheses Won't Show

Oct 29, 2012

I'm trying to use literal parentheses within a text calculation, like: Emergency Medicine ([doctors.doctor name]).

But they just won't show. I've tried to use quotation marks around all literal text, like: "Emergency Medicine ("[doctors.doctor name]")" to no avail.

View 1 Replies View Related

Reports :: Average Contents Of A Field Based On Another Field

Oct 2, 2013

I have a report that has multiple fields - 3 of which matter for this discussion -

1.) employee
2.) employer
3.) rateofpay

The employer field contains 1 of 2 options. For the sake of this conversation, lets call it ABC123 and XYZ123

I need to be able to calculate the average rate of pay for ABC123 company, and exclude the rate of pay for XYZ123 company in my report.

I am calculating this in a section footer.

View 2 Replies View Related

Removing A Field

Jan 25, 2006

I use the template service call management . In the work order section there is a field called Entered By . I would like to remove it as I do not need it and if you do not enter it the work order will not complete . Is there a way to remove it or make it so you do not have to enter anything there >> I have tryed to remove it but somehow it is connected to some thing else and I get error

THXS for Help

Steve

View 8 Replies View Related

Removing A @ From The End Of A Field

Mar 15, 2007

Hi there I am extracting user names from e-mails in an access database.

I built the following command to do it

Left([E-Mails by Source - Test]![E-Mail],InStrRev([E-Mails by Source - Test]![E-Mail],"@"))

where [E-Mail] is the e-mail address.

It works great. But I still get the @ and the end of the name.

Any idea how I can get rid of it (other than using find and replace)?

Thanks for your help.

View 1 Replies View Related

Dynamic Field Contents

Sep 1, 2006

Is there a way to make the value of one field change dynamically based on the values in other fields on the form?

Here's the general idea. I have two tables.

RecordTable
--------------
SiteID, etc.

SiteTable
-------------
SiteID, SiteBlurb

I want have a form, where you can change the SiteID value in RecordTable, and have the SiteBlurb change (i.e. the form pulls the information from SiteTable) dynamically once you have entered the new value.

View 1 Replies View Related

Nullifying A Field Contents?

Jun 18, 2015

is there an alternative to making a field blank, other than my old trusty <Me.Field1 =""> ... ?

(my use of the < and > are purely for demonstration purposes, and do NOT get used in code)

I'd like some fields to be native, virgin, blank, et cetera... I do find sometimes I have to overly complicate a VBA statement by putting.. <If IsNull(Me.Field1) or Me.Field1 = "" then> because I have made that field value = "" to blank it out.

View 3 Replies View Related

Removing The First Four Characters From A Field.

Nov 29, 2005

Hello,

I want to remove the first four characters from a field in a query.

The data are not always the same length, but it will always be the first four.

Example.

vmc_ml120e21/p -> ml120e21/p

Is that possible and how??

Thanks in advance.

View 6 Replies View Related

Removing A Field From A Form

Jan 26, 2006

I use access template service management . In the workorder screen there is a field for employee that entered teh information . I do not wnat to use it I have tried all ways of removing it and get error . It seems to have to be there . Is there a way to remove it ??

Thxs STEVE

View 1 Replies View Related

Removing A Value From A Text Field

Dec 7, 2006

I have a form with a unbound text field which when a user inserts text and then removes the focus from that field, the text gets inserted into a memo field. By using:

Me.[NOTES] = Now() & " " & Environ("UserName") & " - " & Text27365 & vbCrLf & Me.[NOTES]

However, I have noticed an issue with this, in respect that when the user enter text then moves to the next record, the previous entered text is still there, This could then cause this old text to get inserted into the wrong record. How can I set this field to blank once it I have moved to the next record or closed the form?

View 5 Replies View Related

Removing A Field From A Form

Jan 26, 2006

I want to remove a input box from a form that is in the service management template . If I try to remove it I get error . Is there some way I can and not get errors . It is the input for the person that is using the form


Thxs Steve

View 1 Replies View Related

Automatic Count Of Field Contents

Jan 11, 2007

My company requires a query to aid distribution, however I am experiencing some problems implementing the system.

We have purchased a large database of addresses and need to be able to query a town/street to find out how many houses are in that street.

I have the query and form set up to display the street/town and list of house numbers when searched for, however the houses are grouped by postcode rather than street, with multiple house numbers in the same field (see example).

Street
Main Avenue

POSTCODE
HG23 0DF

Houses
89;91;93

POSTCODE
HG23 1DF

Houses 95;97;98


----

Basically, I need a total of how many individual houses there are in a street, regardless of postcode. In this case, it should treat the ";"s as dividers and return the result of '6'. Or in some cases ignore the semicolons as some fields look like ";;;;;;;;13". It should then add both the total for one postcode to the other postcode to display a complete total of houses in one road.

Can anyone make any suggestions?

Thanks in advance,
Matt

View 1 Replies View Related

Separating Field Contents By A Delimeter

Feb 21, 2008

HI

Is there a way that i can split the fields based on the delimiter that i will set in a query?...

for example : 088H-FJAKSDF-SAFN-F

in that case additional four columns will be added becuase it will be separated by a dash (-)

thanks so much for your help.

View 14 Replies View Related

Delete Field Contents Automatically

Oct 14, 2004

Here is one that I could use some help with.

I have an Updates field in all of my tables. It, of course, holds my audit trail. Im tryiing to figure out a way that I could run a single command and clear the contents of all the Updates fields on all the tables in my db. Ideally, I'd like to auto generate a report for all the update fields on all the tables, then do a purge.

Any ideas?

View 4 Replies View Related

How To Update A Field With Contents Of Two Other Fields

Jul 3, 2012

I'm an excel user and in using excel I can take two fields and combine their data in one field. I've got about 6 database files with anywhere form 1000 to 3000 records that have already been prepared and imported into access database files .mdb and I realize that the firstname lastname fields need to also be combined into a contact field with both names. In Excel it's easy in access I'm a little lost. I was looking to an update query however I can't find instructions on what I'm trying to do.

View 2 Replies View Related

I Cant See A Table's Contents As It Is

Jan 21, 2007

sorry for the title. i didnt know what to write.
this is the situation:

i have a form where it populates a table in access (ssmdata) from an oracle table w_ssm_data). this works perfectly.

Then the form read the hole new table in access (ssmdata) to update a specific field.

Problem:
If i open the access table (ssmdata) it is sorted by the flight fields. However, when the form reads the table in order to update the specific field the table seems to not to be sorted by the flight field.

More info:
The ssmdata table in access has many primary keys (flight, departure,arrival,caterer,frequency and aircraft).

If i take a look to the W_ssm_data table in oracle it is not sorted by flight and it is sorted in the same way the form is reading the ssmdata table in access.

example:
table in access:
flight dep arr caterer aircraft frequency
1 a b a 111 67
1 a b a 222 134
2 c s c 111 5


table in oracle:
flight dep arr caterer aircraft frequency
2 c s c 111 5
1 a b a 111 67
65 t h t 252 1


when the update step starts it reads the access table as it looks in oracle. but if i open the table in access it looks sorted by flight.

thx 4 your hlp again, max

View 3 Replies View Related

Automatically Removing Lines When A Field Has No Value

Dec 28, 2011

I'm using a query to concatenate data from a table into a specific HTML format. I would like, however, to find a way to remove lines of HTML when there is no data in a specific field.

Example:

If I were to create a list of available colors of a shirt like so:

<ul>
<li>[Color1]</li>
<li>[Color2]</li>
<li>[Color3]</li>
<li>[Color4]</li>
</ul>

but if there were only 3 available colors, I'd end up with this:

<ul>
<li>[Color1]</li>
<li>[Color2]</li>
<li>[Color3]</li>
<li></li>
</ul>

I need to find a way to get rid of that last vacant tag. I image there's some kind of code I could write (if x is null, clear line17, or something like that) but I wouldn't even know where to start with that.

View 3 Replies View Related

Removing Access Security?

Jul 7, 2005

Hi all, i tried searching, but didn't really come up with an answer

i have an access database I'm trying to link up dynamically with a website, but everytime i try to link up to fields from tables in the databse, i'm getting an error claiming i dont have permission. i have administrator access to the files, yet it's always happening. im under the impression the only thing is remove all the security levels and groups/users so there are none in place, but i wouldnt want to have to copy+ paste everything

is there an easy way to remove the security so i can use it dynamically on a webpage? if i have to make a new database, is there an easy way to copy it all?

thanks in advance

adam

View 1 Replies View Related







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