473,770 Members | 4,029 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can I use the data in one field as a variable in the other?

Hi,

I got a bit of problem with Access and was wondering if someone could
enlighten me.

I'm building a database of products of sale, complete with images. Im
importing the product data from a CSV file into an access databse. The
two main fields Im concerned with are called 'ProductID' and
'ImagePath'.

Basically, I want to copy the record entry for 'ProductID' as a
variable into its associated 'ImagPath' field.

eg: I have product ID 12345. I want to copy the value '12345' and use
it to form the full image path in the 'ImagePath' field ie.
'\images\(var). jpg'

Can this be done easily in Access?

Cheers...John

Jul 18 '06
10 1608

<jo***********@ yahoo.co.ukwrot e in message
news:11******** **************@ m73g2000cwd.goo glegroups.com.. .
Sorry Im being a bit of a thicko here, but how do i enter the "Control
Source" view.
Open the form in design mode, right click on the control, select properties,
scroll down to "Control Source"

Also, to get this to work, should I be creating a new query and
selecting the table?
You can calculate the [ImagePath] in the source query to your form and
control, or use your existing query / table and edit the control source of
the [ImagePath] control.
Thanks again.

paii, Ron wrote:
In the "Control Source" of the [ImagePath] control enter

="\images\" & [ProdID] & ".jpg"

Note "Me" is not used in the Control Source. You could otherwise
calculate
the path in the source query to the form.

<jo***********@ yahoo.co.ukwrot e in message
news:11******** **************@ h48g2000cwc.goo glegroups.com.. .
No, Im using the path to point an image file on a dynamic web page
that
Im generating from the database.
>
What view do I need to be using to insert the value '& [ProdID]' & by
the way? Im in datasheet view and have pasted the above in but
nothing seems to have happened.
>
Thanks...John
>
paii, Ron wrote:
Inside an event procedure, ME is the current form or report. I was
assuming
you were storing the image path to display it on a form or report,
or to
open it with a button click on a form. Me![ProdID] will return the
value
of
the ProdID control on the form containing the command button you
just
clicked.

<jo***********@ yahoo.co.ukwrot e in message
news:11******** *************@7 5g2000cwc.googl egroups.com...
Sorry I dont understand - what does the Me mean or do?
>
paii, Ron wrote:
Replace Me![ImagePath] with "\images\" & Me![ProdID] & ".jpg"
whenever
you
need to display the image.

<jo***********@ yahoo.co.ukwrot e in message
news:11******** **************@ h48g2000cwc.goo glegroups.com.. .
How would I do that Ron?
>
Thanks....John
>
paii, Ron wrote:
"\images\" & [ProdID] & ".jpg"

But why store the image path when you can calculate it
whenever
needed?


<jo***********@ yahoo.co.ukwrot e in message
news:11******** **************@ m79g2000cwm.goo glegroups.com.. .
Hi,
>
I got a bit of problem with Access and was wondering if
someone
could
enlighten me.
>
I'm building a database of products of sale, complete with
images.
Im
importing the product data from a CSV file into an access
databse.
The
two main fields Im concerned with are called 'ProductID'
and
'ImagePath'.
>
Basically, I want to copy the record entry for 'ProductID'
as
a
variable into its associated 'ImagPath' field.
>
eg: I have product ID 12345. I want to copy the value
'12345'
and
use
it to form the full image path in the 'ImagePath' field
ie.
'\images\(var). jpg'
>
Can this be done easily in Access?
>
Cheers...John
>
>
>
>

Jul 21 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7789
by: Paul | last post by:
Hmmm, didn't seem to work. I have set session.use_cookies = 1 and session.use_trans_sid = 1 in my php.ini file. Index.php contains: ---------------------------------------------------------------------------- <?php ini_set("session.use_cookies", "off"); ini_set("session.use_trans_sid", "on"); session_start(); $_SESSION = ""; $_SESSION = ""; echo "<form method='POST' action='login.php'>
4
2603
by: Chuck Anderson | last post by:
I've read some discussions, searched Google, tried pack, unpack, bin2hex, explode, implode, and I just can't figure out how to convert this data. I am trying to read a file with the following format (two examples). 41 6D 74 72 61 6B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 75 05 1A 00 41 6D 74 72 61 6B 20 4F 6E 6C 69 6E 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 8F 05 2B 00
3
4409
by: 'bonehead | last post by:
Greetings, I'd like to figure out some syntax for retrieving the data from a table when I don't know all the of field names. What I do know are, the name of the table, the names of the primary key fields, and the names of the fields I want to use in the "where" clause of the SELECT statement. All of the examples I've seen in my books only show how to do this by hard-coding the names of each of the fields, i.e., $userid=$query_data;
7
2617
by: Jack | last post by:
Hi, I have posted this problem before. Apprently, the suggestion took care of the problem. However, still I am getting the above error message. I am using a session variable to transfer a value from a form to a confirmation.asp page. This value is a calculated field. For most cases this session variable value should be zero. However, instead, it is giving null value and this null value is messing up the update statement which is supposed...
0
329
by: Ken Allen | last post by:
I am relatively new to C# and .Net in general, but have been programming in many other languages for more years than I want to recall. I have a problem where an existing set of code (actually a Windows kernel component developed by a company I do some work for) is returning information to user space in the buffer from an IOCTL call in a 'streaming' format that mixes variable length strings, 8-, 16-, 32-, and 64-bit integer values. The...
8
8934
by: Mark | last post by:
Hello. I am attempting to write binary data from a file to an OLE Object field, and then write the file back out from the database. I am reading and writing the files in binary mode, and using GetChunk and AppendChunk to read and write binary data from the OLE Object field. I am using VBA and DAO for this experiment. The OLE Object field is being used to store Long Binary data.
14
2390
by: Manish | last post by:
The project I am developing doesn't involves database. I want to parse the mailbox file (.mbx) and store the summary in the text file for fast retrieval and display of information in the Inbox page. The sugegsted format are as: #1 ID : Subject : To Address: From Address...etc...
9
5739
by: RMC | last post by:
Hello, I'm looking for a way to parse/format a memo field within a report. The Access 2000 database (application) has an equipment table that holds a memo field. Within the report, the memo field is printed within the detailed area. The problem is, the apllication is not setup properly, thus the users are entering data within the memo field as: location1 1/1/2005 1/1/2006
4
2783
by: Debbiedo | last post by:
My software program outputs an XML Driving Directions file that I need to input into an Access table (although if need be I can import a dbf or xls) so that I can relate one of the fields (fromStop) and its associated driving directions back to a relational database. I have asked my software vendor for solutions but thus far they have not come up with anything. I am totally unfamiliar with XML so I am struggling with how to do this. I have...
20
6929
by: hippomedon | last post by:
Hello everyone, I'm looking for some advice on whether I should break the normalization rule. Normally, I would not consider it, but this seems to be a special case. I have created an "Outcomes Database" used to store response data from measures/ questionnaires for a longitudinal health study. It is essentially derived from Duane Hookom's Survey Database (thanks Duane!!!), with many modifications added to fit the needs of my lab.
0
9602
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10237
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9882
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8905
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7431
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5467
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3589
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2832
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.