Solved

Add strings to Each record in Access

Posted on 2011-09-18
6
302 Views
Last Modified: 2012-05-12
As you can see that “Filter” query counts the repetition of each string.
What I want to do is to create another table with this query and do some access vba that changes the string in each record of the newly created table like this:

Filter
name      count
a                2
bb                2
ccc                 4
d                3

Now...........

A
bb
ccc

Becomes….

http://A.apsx
http://bb.apsx
http://ccc.apsx


So in essence, I am actually appending [http://] in the beginning and [.aspx] at the end of each record in a newly created table, along with the count column.
How that can be done in access vba? Please assist.

thank you
Rayne
0
Comment
Question by:Rayne
  • 3
  • 2
6 Comments
 

Author Comment

by:Rayne
ID: 36555668
I am attaching the sample access
Test.accdb
0
 
LVL 77

Accepted Solution

by:
peter57r earned 400 total points
ID: 36555712
You just use a make table query..

SELECT [Name], "http://" & [Name] & ".apsx" INTO Newtable  FROM filter;


are you sure it's apsx and not aspx
0
 
LVL 30

Assisted Solution

by:hnasr
hnasr earned 100 total points
ID: 36556662
Make table query!
check attached database query1.
Design modified!

SELECT qlFilter.aname, "http://" & [aname] & ".apsx" AS lnk INTO Table2
FROM qlFilter;

Test-2.accdb
0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 

Author Comment

by:Rayne
ID: 36556863
Hello peter57r,

I remember you helped me a year ago in EE !! I rocked that summer internship because of EE and superfast experts like you :)
hehehe, yes thats aspx and not the other version that i mentioned  :]

hnasr, thanks for helping here too


Rayne
0
 

Author Closing Comment

by:Rayne
ID: 36556869
Awesome help always
0
 
LVL 30

Expert Comment

by:hnasr
ID: 36557209
Welcome!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Access 2016 - Query Challenge 15 48
Display multiple images in report 12 83
ms sql stored procedure 22 77
Error in SQL Query 36 33
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now