General :: Cleaning Up Name Field
Sep 5, 2014In given table name is formatted as:
HERNANDEZ JR, FELIX / BRADY, ANDEL
and I need to make it to "Felix Hernandez" How would I be able to clean up "/" , "JR," in my query.
In given table name is formatted as:
HERNANDEZ JR, FELIX / BRADY, ANDEL
and I need to make it to "Felix Hernandez" How would I be able to clean up "/" , "JR," in my query.
I want to create a report for the Monthly cleaning plan of a hotel. For each day, how many rooms need new sheets, how many need new towels etc.
At this point I can generate a report for any given day.
This could be an example of what I want to achieve
Code:
------------ Date | Date+1 | Date+2 | Date+3
New Sheets 2 1 0 2
New Towels 1 3 0 1
Full Clean 0 1 2 0
"Date" is a date tat you can set, after which you'll get the following 30 days("Date+1","Date+2" etc)
I thought that a CrossTab query would give me what I want,but using the wizzard I can't get the result that I want.
Haven't worked with crosstab queries before so maybe I'm doing something wrong, or maybe this isn't even possible with a crosstab query.
Ok, I am working on an exsisting database at work that has alot of code/forms/reports and so on. Whoever worked on this before me apparently didn't believe indenting code or anything like that. Now I don't want to to go all this code to clean up the structure of the code. I remember back a few yeras ago I found an app for VB that did this for you. No clue where I came across it at or even what it was called but I was wondering if there was anything available like that for Access?
View 3 Replies View RelatedHi
I have a table that contains telephone numbers.
The data is in a variety of formats.
Here are some examples:
087 123456
087-123456
(W)087-123456
(H)123456
I would like to strip out hyphens, brackets, spaces, etc.
I hope to do this in a straighforward make table query.
Is there a function available that will strip out non-numerics characters?
Thanks
Noel
In a table, there's a column, "Siebel or Sales Ref". Some of these will have a long sales reference number or an ID from a Siebel sales system (pants), in the format 1-XXXXXXX. The problem is that some have two IDs, separated by a forward slash (/), so like 1-ABC1234/1-DEF5678. He wants to go through the data, and where there's a double ID, split it out, and create a new row with the second ID.
I'm not sure this can be done in Access, I would have done a loop in Excel, but it's his database.
Code:
INSERT INTO ActualBaseData
SELECT *
FROM (SELECT 'ITQ ID', Deadline, Lot, 'Bid Progress', 'Framework Type', 'Tender Type', 'Siebel or Sales Ref'
FROM TempBaseData
WHERE InStr('Siebel or Sales Ref', '/') = 0
[Code] .....
I want to release an Access file which has eveything locked down and cleaned up so that my Form is showing full screen (and nothing else) for an optimal user experience.
View 2 Replies View RelatedI need to create a program that will regularly import a text file of over one million records into an Access table. I've been give a list of about fifty different updates to perform on the data to clean it.
I can't imagine performing all these updates in one query. However, creating fifty individual queries seems horribly inefficient from a processing perspective.
I'm accustomed to stepping sequentially through a table in FoxPro, which seems ideal to me for this type of situation. What is the best way to handle this in Access?
PROBLEM: String Manipulation
"Cleaning up Mom's Christmas address labels"
I need guidance on the best string manipulation functions (Instr, Left, Right) to cleanup my mother's Christmas address list of 300+ names.
I have successfully imported the text file into Excel and exported to Access; fieldnames: FULLNAME, ADDRESS, CITYSTATEZIP
I have found instructions on how to breakout FULLNAME field into FIRSTNAME and LASTNAME.
But within the FULLNAME field are many combinations of titles (Mr., Mr. & Mrs., Dr., HON.) with inconsistent periods applied.
Which one of string manipulation functions:
Instr
Left
Right
would be best for extracting these various titles from this name field?
I understand the concepts behind the above functions, but not enough experience using them to understand the tedious syntax or which string manipulation function would be best for extracting the varying title entries to a separate created field called TITLES.
So far, I have deduced this will be a multi-step process. But asking for guidance:
1.) Which string function is best suited for this?
2.) Example of the function syntax for an update query?
2.) Suggested order to administer update queries?...
to extract misc titles from the FULLNAME field.
I am a novice-casual Access user.
Thanks, Greg
(If someone would copyright these steps into a book called "Cleaning Up Mom's Christmas Address List"... I am sure they could retire from sales on Amazon. :-)
I have a question and I'll apologize in advance because it may or may not really be an Access question.
I have a large ASCII spreadsheet that I have imported into Access. It has 4 columns, and has these headings: CodeID, Group, Division, Account. Many Division and Account combinations can exist within a Group, and there can be many Groups under a specific CodeID. Unfortunately the way I received the data was in a grouped fashion, like so:
CodeID Group Division Account
1234 1111 0001 0001
0002 0002
2222 0001 0001
0003 0003
1235 1111 0001 0001
0003 0003
etc.
Is there a way - easy or otherwise - to populate the blanks with the appropriate information? Essentially to "ungroup" I guess. I need to do this so I can sort and modify the data. Obviously as it is I can't do much with it.
Note, when I imported the data I had Access add unique counter as a primary key. That is allowing me to keep the data in order, but doesn't help beyond that.
Any suggestions???
I have a main form and a subform.
Both forms have the field called JobID in common.
Both forms have a field called JobStatus.
Any easiest solution so that After I Update the field called JobStatus in the subform, it changes the field called JobStatus in the main form to the value which was selected from the subform?.
I am having a database in access and i want to highlight particular text from nearby column to the next column. For example,
--GCCCAGGCCCAAGAATGTCGCCGT GGAGGACTGTCTGTACATCAACGTGTTCGTGCCACGGCCCAGGCCCAAGAATGTCGCCGTCATGCTGT
GGATCTTCGGGGGTGGCTTCTGACAAGCTATTGTGTTCGAAT ACACTGATT
--CGAATGAACGCTGTCCCTTCCACTGCTGGCAACATGCTCCCAGCCTTCGACAATGGCCCTCAATTCGA
GGACTGGTTT CAACGAATGAACGCTGTCCCTTCCACTGCTGGAACTTCCGACTCCTTGTTGCCTAGAATGTCGCCGTCATGC
The first column text it should take as query and then it should only search the adjacent cell and highlight that. While searching in the internet i came across a code also, But i dont know whether i can use that code or not.
ALTER PROCEDURE [dbo].[Search]
(
@searchTerm nvarchar(100),
@style nvarchar(100) = 'font-weight:bold; background-color:yellow',
@maxLen INT = 100
[code]....
Please see attachments.
POST.zip (384.0 KB)
database.zip (58.8 KB)
-How can I address the fields on my forms? I just want to create a button that increases a value by one on click.I tried
FORMNAME.FIELDNAME = FORMNAME.FIELDNAME + 1
FIELDNAME = FIELDNAME + 1
FORMNAME!FIELDNAME = FORNAME!FIELDNAME + 1
but the button does nothing. And that is all I found by googling.
-How to focus a field at the beginning? I want to be able to start writing always in the same field.
FIELDNAME.SetFocus
does not work. I dont know if I made any mistake during creating tables and forms, but these codes should actually work, shouldnt they?
I have a text, date field I need to convert to a date field.For example: 2/11/14 is stored at text: 21114.How can I convert the 21114 into 2/11/14?
View 5 Replies View RelatedI am wanting to populate a field by entering a date in another field. I am trying to determine age(years, months, and weeks) of something by entering a date in another field. Is that possible in Access?
View 1 Replies View RelatedIn one table I want to limit the options of one field depending on what is chosen in another field.
Field Type has two options: Receivable and Payable.
I want field Sybtype with this limits:
If Receivable is chosen in Type field you will only have CreditCard & Lockbox available in the Subtype field. If Payable is chosen you will only have Cheque & Transfer to choose.
Shall I have two separate tables? or only one table with Type and SubType as below? but then how can I make the above work?
Type SubType
Receivable CreditCard
Receivable Lockbox
Payable Cheque
Payable Transfer
Is it possible to look up 2 field to auto fill another field on my form?
Field 1 is "RiskLetter" this is autofill with "Risk" is user input.
I need to lookup RiskLetter and Risk and autofill from "Number" field. This to stop incorrect data being inputted.
So I need to look at the "Risk" & "RiskLetter" to come up with a "Number"
Would it be possible to use a Dlookup to look at RiskLetter and Risk to give me the score.
I made a form for use in touch screen app. I would like to make a form button that will act as TAB- move from field to field in the form.
View 4 Replies View RelatedI need to update a field with a Sum() on event.
View 12 Replies View RelatedI have a table called 'maintable'. It has 5000 plus entries of employees with different fields. Every Employee has unique ID. One field is date of birth (dob). Normally more than one person can have the same date of birth. A form (maintable1) is created to enter data into this table.
In order to avoid duplicate entry of the same employee again with all his data, I wish to know if the same date of birth (dob) which is being entered now already exists for any employee to verify if the employee being entered is the same, if not then I can enter the data of new employee with the same date of birth.
So basically when I will enter data in a form for the dob field, if the value is the same, then a message that entry already exists, then the 'maintable' may open highlighting the same date of birth entry, so it can be verified if the same person is not entered again.
I have a form that holds student information at the top of the form I'd like it to display the name of the student as I am scrolling through records.
So in other words, I have my fields First Name and Last Name on my form. But as I am going through records i want the full name of the student to display on top of the form as well as in the next box.
How would i do this?
From what I understand an OLE field would be able to hold a picture instead of text, correct?
Can I use an image in an OLE field as the image in a report? Here's my situation:
I have a report that we use to print an invoice that we send to clients. I want to include a scanned copy of a staff member's signature on the invoice but there are multiple staff members who would use this.
If I create a table with a Staff_Name field and an OLE field of Staff_Signature, which would hold the scanned signature image, could I use controls in a form to select which signature is included on the invoice report?
I'm not necessarily looking for how to do this right now, just if it is possible. I doubt I have time to really work on this in the immediate future, I'm just wondering if it is something I should look into.
I already have a function with multiple copies of the invoice report, each one with a different staff member's scanned signature. But that's bulky and it means that the reports and command buttons need to be changed with any staff changes. I would like to streamline this process.
how to combine 3 field into 1. For instance. I have a customer table with company name, branch, floor, department. then i am gonna create a query called customerextended and combine all these 3 field so that I can select them in the combobox.
I have a sample here but I just dont know how to edit it...
"Company name: IIf(IsNull([department]),IIf(IsNull([companyname]),[floor],[companyname]),IIf(IsNull([companyname]),[department],[companyname] & " " & [department]))"
I currently have a field on a form thats indexed (no duplicate values). What I want, is if the user types a existing social in the field, that it lets them know the social is in use and that the record will not save.
I believe this will have to use the before update event for my pSocialSecurity control and that I will need to use the DCount function.
I have a simple Table with the following structure:
ID
Product
Current_Level
Received
Available
How can I retrieve the previous value of the field [Available] and to set this value for the new [Current_Level] ???
i have a tbl that stores items that have an expiry. in a child table i want to store the expiry. but as it is different for each item i need a way of doing this.
i thought that by having
DateAdd('m',3,Date()) in one of the fields this would work.
on click event i would like the date add to come into play but the way i am doing it comes up with an error. too few arguments.
this is what i have so far
Code:
Dim rs As DAO.Recordset
Dim db As DAO.Database
Set db = CurrentDb
[Code].....