I have a table that has about 5000 street addresses (ex. 1234 your st.). I want to get the all the characters until the first space. So for (1234 Your St.) I want to get 1234 for W1234 St I want W1234. Is this possible?
HI, i have a field in a query called [cost_type], these typically contains the values "principle works" or "additional works" how can i set the query up so that it doesn't return the "works" part of the record? Could i just return the first 10 characters of the result? thanks
Another issue for my contacts database for work. I have a listbox on the edit contacts form that lists all contacts in the database.
The listbox rowsource is SELECT [ContactID], [LastName] & ", " & [NamePrefix] & " " & [FirstName] & " " & [Business/Organization] FROM tblContacts ORDER BY [LastName] & ", " & [FirstName] & " " & [Business/Organization];
Some of the contacts that are businesses or organizations, do not actually have the first and last name filled in, just the business/organization name. So what happens in the list I get all of the entries that do not have FirstName/LastName at the top of the list, with the Business name following a few spaces. The way it looks is:
, Stop & Shop Supermarkets
But I would like to trim that beginning part if there is no FirstName/LastName so that Stop & Shop Supermarkets gets sorted with the S's, like this:
Stabile, Lisa Stop & Shop Supermarkets Stott, Joan
Is there something I need to put in the rowsource to accomplish this? I've searched these forums for an answer, and turned up no results.
Attached, I have a screenshot of the form with the listbox.
My DB is on SQL Server with an Access adp front end.
SQL uses the Windows NT user name and password for security and also pulls in the user name into a field in every record so we know who has added and modified it.
For one table we are actually using the user name field on the form and in a report for reasons other than security.
The user name is filled in with first the name of the network group, then a slash, then the user name itself. So there are 7 characters I don't really care about.
Is there a way in VBA to remove those first seven characters and only show what comes afterwards? Thanks for the help!
I have an access table which lists a customers address, however, if the customer has a temporary address it will also list that on a separate line -
CustID Address Type 1234 5 The Street P 1234 12 The Street T 2345 13 The Road P 3456 12 The Avenue P
Where P = Permanent and T = Temporary
I want to set up a query to show the permanent address where there is only one address, but where the customer has a temporary address also, I want to list the temporary one instead.
If I have a DB with several tables containing thousands of records, and most of those records only ever need say 8 characters, does anyone know if changing the field size from default 255 chars to 8 chars will actually benefits the the DB?
Potential benefits I'm thinking may occur are reduced filesize and maybe some speed?
I've got a piece of VBA scripting which runs as an event linked to a button on my MS Access form.
I maintain a database of members of staff at my organisation. It's pretty outdated...
I'm basically wanting to pull in their updated data (extracted from on our payroll system) from a spreadsheet, into a form, when clicking a button on a particular person's record.
The function "CStr(DDERequest())" converts the cell number into the readable data, however I seem to have whitespace below the value.
What would I need to do to strip out this whitespace? Would I use strtrim? If so, I am unsure of the syntax... how would I incorporate strtrim into the above?
I have a form bound to a table which stores contact info for a person. I have two controls that are email_address and website_address. I set them both as hyperlinks. So now when the user clicks on the email_address Outlook opens a new message with an email_address in the To field. (I had to use a function found on this forum to replace the "htttp" with "mailto" on AfterUpdate event in order for this to work properly.) However, now trying to add some other features to my DB I ran into problems listed below. I wonder if I should have rather left that control as Text instead of Hyperlink, and use the DoCmd.SendObject on doubleclick event instead of using the above solution. How people usually store email addresses and enable emailing on click?
The problems I ran into: 1) My main form is in popup mode and therefore right click on the hyperlink does not give an option to edit the hyperlink 2) I copied a function from this forum which gathers a list of emails and sends one message to the emaillist. However, my email list instead of generating as: email1@a.com; email2@b.com it generates as: email1@a.com#mailto:email1@a.com#; email2@b.com#email2@b.com#
I guess I could extract the email using vba (not sure how), but I still don't know how to solve issue number 1. So maybe it is better to siwtch the field to plain text and forget the hyperlinks?
Thanks, Mariusz
PS. What procedure on double click would open a default browser, since I also have to deal with web addresses and thought of turning them into text controls?
I have an address all in the one line at the moment. My front end has been programmed this way. Now I have to split the address into 3 or 5 lines. The address looks like this:
3 Thorn Road Edinburgh Scotland G68 2AA
The post code is in a seperate field so that makes it easier for me.
Hi Ive got a form that has customer details at the top i.e name, address etc. and then a products subform. Once I have chosen a customer it then automatically fills in the address fields and i can then add products to the order. I then press a button which produces a form showing the customer name and address and the products they ordered. I want to be able to have it so I can add a tempory address if the customer wants the goods to be shipped somewhere different to there normal address. How do I do this without adding another address into the database?
I have two addressess, primary and secondary. I would like to make an option button on the form that indicates (when selected) which address to use for mailings? Although, 9 times of 10, mailings are sent to the primary address, but there are those exceptions...
Can someone direct me to an example code to perform this?
I have a form "frmsend mail" whic have fields "To" and "Cc" i want to have a address book in the access itself having same functionality as outlook i.e it should add new email id to the address book, prompt the email id,etc. How to do tht. thnxx
Just a little advice on how to approach a problem.
I have some simple address validation in an unbound form. When the user types in a suburb, I have a DLOOKUP function that returns the appropriate postcode for that suburb.
My problem is that most suburbs have more than one postcode (standard and PO BOX).
How can I return both values?
My intention is to then allow the user to select the appropriate postcode.
I have a form for all my clients, and currently there's a separate field for each part of the address. This does not make it easy to cut and paste an entire address block. I therefore created an unbound text box with the control source as:
This works ok, but if someone doesn't have anything in the fields [Pref1] or [Pref2] it leaves blank lines. Is there a way to code it so that I can have a complete address block? Thank you.
Hi - I am importing information into my database of customers names and addresses. The country part of the address comes in 2 letter code - eg AU = Australia, IT = Italy etc. What I would like is to change these to the actual country name. Is there a neat way of doing this? I am thinking doing a whole line of if then, but it all looks really messy. Thanks Fiona
I have a form "frmsend mail" whic have fields "To" and "Cc" i want to have a address book in the access itself having same functionality as outlook i.e it should add new email id to the address book, prompt the email id,etc. How to do tht. thnxx
Problem: Turning an address column containing a comma into two or three address colums containing no comma
I have a database with the structure: company address town postcode (zip code)
The present address column contains one of the following (I give examples)
-76 Nelson Street
-99 Bush Lane, Waddington (where Waddington is a village, or quarter of the town named in the town field)
-Nixon House, 150 Clinton Street, Hareswood
-sometimes there might be a redundant comma at the end of the string e.g. 99 Bush Lane, Waddington,
-very occasionally the address field is empty (when the record is still incomplete
----------------------------------------------
We now have to interact with another company and its software, which takes commas as field delimiters. We therefore have to get rid of all commas in our address field.
I have therefore revised our structure so that it now is: Company Addr1 Addr2 Addr3 Addr4 (which contains what was formerly 'town') Postcode (zip code)
Now I must distribute the contents of Addr1 into Addr1, Addr2, Addr3 and eliminate the commas in the process.
Our database has 4000 records. Therefore doing this manually is prohibitively expensive and takes far too much time. We need the revised database virtually overnight.
My knowledge of Access is fairly limited, but it is ***I*** who has to solve the problem.
Request ------------
Is it possible to do this automatically?
How would you proceed, which steps?
If an Action Query has to be used - well, I have never used an Action Query before (but I have a hefty book about it = "Willing to learn - fast").
If there is a simple formula to be entered into the Action query, could someone please give me the formula?
I've inherited an Access Application which is basically a Front End for calling Integration Service Packages - for all intents and purposes it could be stored procedures or anything other executable. A number of forms have hard coded links that point to a particular executable on a network drive.
With regards to this the UAT packages will live in a different directory than the DEV code so is it possible to parameterise the link e.g. could W:CAT DevelopmentAutomation PackagesOTCOptionsImport.dtsx become W:PARAMETERAutomation PackagesOTCOptionsImport.dtsx - if so then how do I create a parameter, capture it and use it in the link above.
The whole project is lacking the use of parameters at an ACCESS level and Integration Services level but due to time constraints there is no scope to major overhaul the system design.
I am a developer with many years of experience but my Access knowledge is limited so any pointers would be helpful.