473,385 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Populate one field using info from another with added text

I recently updated my Access 2007 database to allow images to be displayed in a form. In order for this to work, the path to the image file must be typed in a field, what I am calling ImageName.

The images are numbered the same way as they are in the database. What I want to be able to do is pull the image number from one field, and "wrap" the path information around it in another field. Something like this:

C:Folder\Folder\[ImageNumber].jpg where the ImageNumber, which exists in another field, can be pulled and put in the middle of the text.

Any ideas? Thanks!
Feb 5 '13 #1
2 1011
Rabbit
12,516 Expert Mod 8TB
You can use the Mid() function to extract a substring. You can use the & character to concatenate multiple strings.
Feb 5 '13 #2
NeoPa
32,556 Expert Mod 16PB
My best recommendation for that is to use the functionality provided by Replace().

Assuming you already know the path is "C:\Folder\Folder\" then you could use :
Expand|Select|Wrap|Line Numbers
  1. strFullName = Replace("C:\Folder\Folder\#.jpg", "#", Me.txtImageNo)
Feb 6 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: GavMc | last post by:
Hello I am new to internet programming and wonder if anyone can help me with this.... I am trying to pass a hidden field value on a form into another field on the form so that it can then be...
0
by: dave | last post by:
In A2000 I have a table containing a memo field. There is an unbound form for entering text, and there can be lots of it. When the form opens there is a function to grab the data from the table and...
1
by: RML | last post by:
Hi everyone, I am using VB.NET 2003 and an OleDBDataAdapter to update an Access table's DateTime field. The field's format is set to "General Date" (ie: 11/24/2004 8:00:00 AM). The problem is...
0
by: Peter S | last post by:
Hi: I am trying to read a SQL Server text field (Access memo field) using connection.OpenRecordSet("qry with text field") rather than database.OpenRecordSet("qry with text field")
4
by: normb | last post by:
My name is Norm, I changed something that caused this problem, and I do not what it was. I also do not know how to debug this problem! The line where the crash occures is marked by an *. The...
8
by: 14erclimb | last post by:
Hi, what a great resource this forum is! Hopefully you all can help: I have one field called "OPERATION_NO" another called "WORK_CENTER_NO" and another field called "OPER_STATUS_CODE" I'm using...
3
by: Excel 009 | last post by:
Hi, Is there a way to populate sequential numbers in a field using SQL or VBA? If yes, how? Assume the following is my existing table: Fruit ID Apply Banana
4
by: Martin Horst | last post by:
Hi, I've got an application which is written in .Net 1.1. When I try to write a varbinary(max) field using the SqlCommand and SqlParameter classes I got an exception like this: "The...
1
by: ramel | last post by:
Hi all, I have a problem related to javascript , ajax and jsp. Please see this url http://xil.co.in/print_screen_2.JPG. I am working on this form. There are some buttons (like submit ,...
2
by: jerald m | last post by:
Hi, how can i pass the user input value of ( in text box field) to the another Jsp in url? Form Code <td> <input type="text" name="dil_ProjectCode" id="dil_ProjectCode"> </td>
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.