Dynamically Linking To Images

May 9, 2006

Hello Access heroes..

I'm using the following code to dynamically link to images in a popup form:

thisPicString = GetPath(CurrentDb.Name) & DLookup("details", "infoTbl", "Item = " & Chr(34) & "Image Folder" & Chr(34)) & ""
MsgBox thisPicString

Me.Image1.Picture = thisPicString & "DNA.gif"
Me.Image17.Picture = thisPicString & "wDNAslogo1.gif"
Me.Image18.Picture = thisPicString & "defralogo1.gif"

The thing is, it finds the images fine, but before it does this I get an error saying Access cannot open the file name xyz.

xyz is the path the picture has originally, but doesn't exist anymore.

Any ideas? I've tried this code at _Open, _Load and _Current, but all to no avail. At what point is access trying to link to these images? Can I get the code in there first?

Cheers,

View Replies


ADVERTISEMENT

Dynamically Linking Front End & Back End

Jun 1, 2005

I had posted this in another area but didn't receive a response and my whole project has ground to a halt until I sort this out :(

I have made a database with front and back ends. Now I wish to be able to use the front end over the Internet but the IP address of the back end keeps changing weekly because of my ISP.
Now I have made a splash screen at the start of the program which asks for the IP address and when this is entered the front end links to the back end - but I can't get the code right for this

The code I have at the moment is embarrasingly wrong so I'm not putting it up here

The code I have at the moment has a box that asks for user to enter the IP address - I need it to use the IP address to enter the database at ip//data.mdb

Regards, James

View 3 Replies View Related

Linking Images To Combo-Box Selections

Aug 5, 2005

I currently have a form with a drop-down combo box that is used as a tool for selecting an employee's last name. After selecting a name, the text boxes below the combo box are updated to match up with the selected name.

However, I am trying to get the employee images to do the same thing, but it's not working. The employee photos are currently "Bound Object Frame" items. Any suggestions/help would be greatly appreciated.

Thanks in advance. :)

View 10 Replies View Related

Reports :: Dynamically Linking MS Word Document To A Report In Access 2010

Apr 18, 2013

I have developed a database using Access 2010. This is split into a Front End and a Back End.

In the same folder as the Back End I store a number of user modifiable files in either bitmap (.bmp) or MS Word (.doc to retain compatibility with older versions).

Unfortunately, the drive letter where the back end resides will change from location to location and I can't do anything about that.

I have set up a function that returns the location of the folder where the docs reside irrespective of the back end drive location, and this works perfectly with OLE linked pictures but not with OLE linked Word documents. User changes show correctly in Word document changes at locations with the original drive assignment but other locations show only the original doc contents even though they have been changed on the local back end location. - even if I delete the Source Item info on the report!!

An example of the code I am using for the Source Item is <GetBackEndPath() & "Footer.doc"> without the angled brackets of course, where GetBackEndPath() is a global variable storing the location of the documents folder ending with a back slash.

I have tried the above in the reports Source Doc property but Access won't accept this and says it isn't valid for this property.

View 2 Replies View Related

Dynamically Add Field To Record

Feb 24, 2005

This may be a really straightforward one but I cannot seem to find a solution.

I need to run a select query, (for a mailout) then mark the records that have been selected in the query on the main database table with a mailshot code.

Any ideas on how best to achieve this?

I was thinking of making the select query maketable (because I have to export a txt file of email addresses for a mailing list), then add a mailshot code field, then append this extra field to the main table.

The trouble is that I am not sure how to use the query to add this extra field to the maketable & once this has been done, how do I append the values to the original table when the mailshot code field does not exist, can it be dynamically created?

Any help will be much appreciated.

View 11 Replies View Related

Transfering Data Dynamically

Oct 1, 2005

Hi,

I have a subform called "Earthwork". I also have a query called earthwork200 and I need to dynamically transfer data from the earthwork to the query based on a certain column.

for example, the earthwork column i am using to transfer data to the query is "Desc" (the name of the column). How do i get data to dynamically goto the query as I click on a new item under the "desc" column?

Kindly HELP!!

View 1 Replies View Related

Changing The Field Name - Dynamically

Feb 18, 2006

Hi All,

I have built queries based on tables. The field names are the technical field names of an application. For example pernr is actually Personnel Number etc.

My queries are set up as follows:

Field = pernr
Table = etc

I would like to rename pernr to Personnel Number so that the column heading in the datasheet view is Personnel Number.

I know I can do this manually for each query by using the following as the field: Personnel Number: pernr

Is there any way of getting this be done dynamically using a lookup table etc. I have lots of queries and I don't want to manually change them all. Furthermore, if I wanted to rename Personnel Number to Personnel No. then I could do it in the mapping table rather than in all the queries.

Thanks,

Evan

View 2 Replies View Related

Updating Queries Dynamically

May 23, 2006

Hi Guys

my database is essentially a questionnaire of around 200 questions. I'm trying to add a 'light' version to it.

I've added a 'include in light verion' tick-box to all the questions and a 'light analysis' tick box on the registration page.

The questions are all genertated via queries pulling out the appropriate ones as required. What I'm tying to do is add to these queries so that if the 'perfomr light analysis' tick box is ticked only those questions that have been indicated as light are included, and if it's not all teh questions are included.

I can do either-or but not both dynamically

Can anybody help?

Thanks
scube

View 1 Replies View Related

Showing Data Dynamically

Dec 6, 2006

I don't know if anyone can help me with this one at all.

I have a query that contains all the possible data that my users will wish to get data from but I want them to have the option to show/hide particular columns to make the query ad-hoc.

I have some code that copies my query to another of a unique name during the course of their Access session so they end up with a query with the name 'ABC' for example that they can run.

If this query ABC has columns A,B,C,D which are all defaulted to be shown and the user decides they are not interested in columns B and C is there Access code that is equivilent to this pseudo-code?

ABC.A.Show = True
ABC.B.Show = False
ABC.C.Show = False
ABC.D.Show = True

where ABC is a query, A..D are columns and Show is the checkbox in the query definition.

That I can run in VB 6.3?

Aenathras

View 3 Replies View Related

How To Use Startup Form Dynamically

Jun 1, 2005

Hello Guys,
I have proj name m1.mdb which has forms and reports.I have 2 forms form1 ,form2.In form2 I have button that creates new database named m2_date.mdb and creates report and form1 by using property DoCmd.TransferDatabase acExport, "Microsoft Access", sFilename, acForm, "form1", "form1", StructureOnly, StoreLogin,now this form1 has to be seen first when any user doubleclicks m2_user.mdb,so my question is, is there any way i can setup startup form properties dynamically ,without using startup form manually from tool properties of toolbar.
hope to get answer..
thanks
vsap

View 2 Replies View Related

Adding Controls Dynamically

Dec 9, 2005

I have a form that has several rows of controls (comboboxes, textboxes, checkboxes, etc)

Each row is exactly the same. There is one row for every 'driver' in the 'SalesDrivers' Table.

Instead of manually adding a row when we add a new driver I would like to form to dynamically create the form based on the drivers in the table.

Any suggestions?

View 6 Replies View Related

Dynamically Updating Combobox

Mar 27, 2006

sorry if this q has already been asked, but i couldnt find what im looking for after searching..

i have a main form. there is a combo box that is that is bound to tblSupplierDetails. this combox displays the records stored in tblSupplierDetails fine. now beside this combobox i have a hyperlink that opens a subform called 'subfrmAddNewSuppliers'. this subform works correctly - ie. when details are entered here, they are stored in tblSupplierDetails

my prob is that if the user adds new supplier details via the subform, these details do not appear in the combo box for the user to select when they are returned to the main form.. they appear if the form is restarted

Ive inserted the statesment Me.ComboBoxName.Requery (with ComboBoxName ammended) into the event procedure for After Update for the combobox.

however, with this the new details which are added via the subform are replacing the previously added record - so theres only ever one record in tblSupplierDetails.. can someone pls help me with this?

View 7 Replies View Related

Update Textfield Dynamically

May 8, 2006

I have a database that has a field [country] that stores the numerical id of the country from a table of countries. The student table also has a field called [mother tongue] and it seems to me that this is duplication.

I created a simple query based on a link table that tells me the country and its associated mother tongue.

SELECT [-LOOKUP-ALL-Country-LinkToMotherTongue].Country, [-LOOKUP-ALL-Country-LinkToMotherTongue].MotherTongueLinkNo, [-----LMotherTongue].Language
FROM [-----LMotherTongue] RIGHT JOIN [-LOOKUP-ALL-Country-LinkToMotherTongue] ON [-----LMotherTongue].[Reference no] = [-LOOKUP-ALL-Country-LinkToMotherTongue].MotherTongueLinkNo;


It seems to me to be an overhead to store in the student table the mother tongue id.

How can I create a text lable that dynamically shows the mothertongue as i move over records?

that way the user can see the students mother tongue but I only store the country table and link table to mother tongue. as opposed to a mother tongue entry against all students.

regards in advance
Peter

View 2 Replies View Related

Order By In A Report Dynamically

Oct 31, 2004

How do I let users choose the way they want to sort their reports through a form dynamically?

View 1 Replies View Related

Dynamically Update Combo Box

Jan 26, 2006

Hi, I am new to asp development and have been searching all through the web and books to help me but I am a little stuck and would appreciate some help please with updating a second combo box.

I am developing an online fault logging system for a school where the teachers/pupils can report a fault with any computer equipment to the technicians so they then can fix it.
I have two combo boxes called ResourceType and Resource ID which are created and populated from two different tables in an Access database (I dont want to annoy you with the code but if you like I can show you)

When ResourceType combo is selected it should automatically update the ResourceID combo from a table in the database. eg. ResourceType=Laptop then ResourceID should be populated with all the entries in the DB which correspond to Laptops, i.e. Laptop001, Laptop002 etc.

ResourceType combo is populated from table tblResourceType in the Db and ResourceID is populated from table tblResourceID. This works fine when the page is first loaded but I have problems with the onChange="handleChange(this)" function for the ResourceType combo. It is :

Code:function handleChange(nSelection){var IDSelect,iCountIDSelect = document.form.ResourceID //Reset the ResourceID combo contentsfor(i=IDSelect.length; i>0;i--){ IDSelect.options[i-1] = null} //Open Database<%set db=server.createobject("adodb.connection")db.Open"DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("MCB Fault Log.mdb")dim dbaseset dbase=server.createobject("adodb.recordset")%> <%Dim iCount 'counter variablesSQl = "SELECT ResourceID from tblResource"dBase.Open sSQl , db%> //Reset Counter iCount = 0<%do while not dBase.EOF%> IDSelect.options[iCount] = new Option(<%=dBase("ResourceID")%>);//********This does not work****** //IDSelect.options[iCount] = new Option(iCount);//***HERE**This works (places the count of each record in the combobox iCount = iCount + 1; <%dBase.MoveNextloop%>}
Dont worry about the SQL statement for now, I am happy just for any table to fill into the combo. Look at the //********This does not work****** line - I think I have the syntax wrong, I have looked at lots of examples on the net and I cannot find one similar to this. The line ***HERE** places the number of the count into the combo box so at least i know the the database is being accessed.

Does anyone know what is going wrong here.

Thanks in advance for any help you may give

Cush

View 1 Replies View Related

Add Controls To A Form Dynamically?

Oct 27, 2006

Hi,

Does anyone know how to add controls to a form, dynamically??

View 6 Replies View Related

Modules & VBA :: Map Columns Dynamically

Mar 16, 2014

got the following issue:

There are two tables A und B.

Table B contains columns like 1FC, 2FC,...., 12 FC

standing for forecast sale quantities.

Now I want the user to decide how many FC columns he wants, always starting with 1FC.Let's say he wants three FC columns.Now I want to map these 3 FC columns to the table A. Both tables contain column Product_Classes.Can I shrink table B to the 3 FC columns ?

View 3 Replies View Related

Dynamically Generate Content On Forms

Apr 10, 2006

Hi,
Does anyone know of a way to dynamically fill the content of a form at runtime. I want, for example, when a user clicks a button, a textbox is dynamically added (but I would prefer not to use hidden objects). I've tried the "CreateControl" option but I can't seem to get this to work. Any coding examples would be much appreciated.
Thanks,
Mark.

View 4 Replies View Related

Dynamically Creating MS Access Table

Feb 5, 2008

Hi,

I am trying to create a series of MS access tables from within a SQL 2000 DTS package. The names of the tables reflect the date range of the data within them. Creating the "Create table ddmmyy ...." statement isn't a problem (full code below), but doesn't run as it creates a Jet error - "Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'. Does anyone know if what I'm trying to do is possible.

Before anyone suggests it, yes I have posted this on SQL server forums.

declare @TheName char (8)
,@Cmd char (500)

select @TheName = (select max(LastRunDate) from NSP_Analysis_Dates)

select @Cmd = 'CREATE TABLE `NSP_Analysis_' + @TheName + '` (`TYPE` VarChar (200) NULL, `VENDOR_NO` VarChar (10) NULL, `VENDOR_NAME` VarChar (50) NULL, `AMOUNT_CLAIMED` Currency NULL, `REGION` VarChar (100) NULL, `CLUSTER` VarChar (100) NULL, `PLANT_CODE` VarChar (15) NULL, `PLANT_NAME` VarChar (50) NULL, `DATE_OF_SERVICE` DateTime NULL, `STATUS` VarChar (200) NULL, `TICKET_NO` VarChar (20) NULL, `NOTES` VarChar (255) NULL, `DATE_ENTERED` DateTime NULL, `AuthorisedByName` VarChar (50) NULL)'
sp_executesql @Cmd

View 1 Replies View Related

Adding Extra Columns Dynamically

Mar 5, 2007

Hi

I have 120 tables, each with the same name except 2 identifying characters at the end eg pc_dist_ab, pc_dist_al
Each table currentnly has 3 columns.
I would like to be able to add 2 additonal columns to each table with one query and was hoping an alter table query where the table name matches pattern would have worked but evidently not.

Is there a way to build some sort of dynamic query to add extra columns to these different tables at the same time?

To save another post I guess Once this is done I would then like to create 1 main table by creating a new table and appending all the files together- again I would prefer to be able to run this once.

I'd appreciate any help/thoughts as to whether this can be done?:confused:
Thanks

View 1 Replies View Related

Dynamically Updating Characters Typed

May 11, 2005

I have a form, very basic.. it contains more or less an inventory frontend in which users input computer equipment that we carry in our state dept.

To make this very brief, in my form at the end I have an "Additonal Information" textbox in which users can add additional notes, comments, etc.

As textboxes are constrained to 255 characters, I chose to show an additional textbox directly below the Additional Information textbox, with a control source set to =Len([Additional_Information]) to show users how many characters they have typed.

What I'd like to do though, is make this value dynamically update while the Additional Information textbox is still in focus... so far, all I can get it to do is update once a user has tabbed away from the additional information textbox.

Is there a way to make this update in real-time?

I appreciate any feedback at all.. thanks :)

View 2 Replies View Related

Dynamically Loading Query Results

Sep 25, 2005

Hi All,
I am new to Access and looking for some help.

I have a query, which reads the combo box value and loads the result in Text box. It works fine when I load the Form.
Now here is the problem… If I select another values from combo box the query result remains the same (in text box). How do I make it work dynamically?
So when I select new value in combo box, the resulting query gets updated in textbox.

Thanks

View 3 Replies View Related

Change Color Of A Combo Box...dynamically

Sep 28, 2006

What I want is in the combo box, I have a couple of options, say 1,2 and 3.
And I want the combo box to come up with different color when different option is selected.

I thought I have found out a way, with the following code to onClick:

If me.field.text = "1" Then me.field.backcolor = 255

The problem is, it's being shown on a continuous form.
And it changes the color on all the records. not just the one I am on.

Any thoughts?

View 1 Replies View Related

Subform Not Refreshing Data Dynamically!!

Oct 6, 2006

I am using a subForm inside a parent. The subform is in the "dataview" format and it shows the data of a particular table (say 'Processus'). What I want to do is, when I insert a data from the parent form into the table processus, I want the child to display the the new record dynamically...

Is this possible? Is there a property like child.refresh ??

View 5 Replies View Related

Dynamically Associating A Pivot Table !!

Oct 30, 2006

I have a pivot table, It is associated with a table in an another database (access database ofcourse!). What I am doing is that I am inserting new data on a click of a button in that table but the pivot table shows the same old data, it does not refresh..!!

How can I do that??

View 5 Replies View Related

Dynamically Change Form Data

Mar 14, 2007

Hey all,

I've tried to find this on my own, but without luck. I have a Microsoft Access form that I've build. The data is pulled from tables I built. There is a "User" dropdown, an "Email" field and a "Phone Ext." field. I'd like to set it up so that when the "User" dropdown triggers an On Change event, the "Email" field and the "Phone Ext." field automatically update with the appropriate data (all from the same table). Can anyone help me with this?

Thanks,

- MT

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved