Cmd Button/Link Doc Help

Jun 21, 2006

I need to create a cmd button that lets a user attach a file to record.
I would like it to open a msg box that lets the user select the file to be linked to that record. Please help. Thanks.

View Replies


ADVERTISEMENT

Command Button To Link Forms

Apr 6, 2006

Alright I give up. I searched the forums and read up but still not grasping it. I know I've done something like this before but my brain must be dead today.

So I have 4 important tables. I have a main one and 3 tables that have records related to the main one. They're all the "many" sides of the one to many relationship with the main table. Outline is below:

Main Table:
EMP_ID (Primary key)
...and other fields

Employment Table:
HIRE_ID (Primary key)
EMP_ID (for relationship)
...and other fields

Insurance Table:
INS_ID (Primary key)
EMP_ID (for relationship)
...and other fields

Skill Table:
SKILL_ID (Primary key)
EMP_ID (for relationship)
...and other fields

So basically what I'm looking for is to have a main form pop up that has the Main table information (employee info). Then on that form I want 3 command buttons, each one going to a new form that relates to the three tables above and is relative to the Main table. Each employee may have several hire/fire listings, insurance listings (if they change their insurance), and skill ratings (updated as they improve). When I have set all my relationships so that the EMP_ID on the Main table has a one to many relationship with all the EMP_IDs on the other tables. When I create the command buttons though and start to populate a record in one of the three "subforms" the EMP_ID is not populating to be the same as the EMP_ID from the main page thus making me unable to create a record because it doesn't recognize a related record.

What the heck am I doing wrong

View 14 Replies View Related

Forms :: Button To Link To Image

Apr 10, 2013

I'd like to put a button in a form that when clicked opens an image on the computer, the location of which is already specified in a field called RefImage.

When I change the hyperlink property I can only have the button open a folder or internet address rather than a unique image for each individual record.

If I use the code builder for the event on click and try to write Application.FollowHyperlink RefImage it gives me error message 490 that it Cannot Open the Specified File, but this is probably because I don't know how to write VBA.

Any simple way to make a button on a form open an image in IE or windows image viewer which has a path specified within a field of the form? Perhaps someway to use the Application.FollowHyperlink, clearly I am doing something wrong.

View 8 Replies View Related

Edit Command Button Trying To Link Form

May 13, 2006

See Attached Database

I created a form called cptSearch
On that form has a list box

What i want to do is when user clicks on cpt in list box and clicks on the edit command button it will open the frm called frmcpt so user can edit details for the specific cpt code


Any Ideas

View 2 Replies View Related

Forms :: What A Command Button To Link To A Field

May 10, 2013

Ok so the Data I have holds a hyperlink to a file this field is "basepath".In Form view I want to have a command button that reads the basepath (for that record) then opens said hyper link.

View 3 Replies View Related

General :: Link CMD Button To Open Certain File

Aug 28, 2012

I have a database setup to keep track of spare parts in my inventory. I want to have a button on my form page that will bring up a file with pictures of the object.

View 5 Replies View Related

Link Pictures And Adding Browse Button

Jun 29, 2012

My job has recently decided that I need to build a database of test pictures, I've read many forums on the link pictures / putting browse button as I gather it makes the database too large with attachments.

My problem is I think I grasp the concept but I cant seem to use the code / Im not sure where im actually putting the code.

e.g imgControl.Picture = CurrentProjectPath & subforldername & Me.ImageName

Where do I put this ? does this go in the field or in a macro ?

Also for the browse to button I have this

Private Sub Explore_Click()
' Gets a filename from the filedialog control and puts it into
the
' "Filename" textbox control.
' Be sure to rename the Common Dialog Control "cd1"

[Code] ....

When i try to put this into a button it doesnt work.

I've attached my amazing database for reference, you will see pictures attached, these were before I knew about linking and I want the links to work like the attachments.

(Using access 2007)

View 1 Replies View Related

Help! Cmd Button Link To Unique Hyperlink Stored In Table

Aug 23, 2005

ok, I have links to documents(reportLink) stored as type text in a table (Investigations). Each link is different per record.

I have a form that display information from this table. The field that holds the hyperlink is called reportLink on the form. On this form I would like to have a button that when clicked will open up the [reportLink] for that particular record. so this button will point to a different file each time the record is changed.

I have stumbled around this site and think I have to put the
Application.FollowHyperlink code in the OnClick event for this button. However, I am clearly not doing it right as it isnt working. what is wrong with this:

Private Sub Command34_Click()
Application.FollowHyperlink Me.[ReportLink]

End Sub

View 2 Replies View Related

Forms :: Option Button Link To Invisible Subform?

May 8, 2014

I have two option buttons, 1_optn and 2_optn. I have two subforms, 1_frm and 2_frm.

When clicking the little round dot (the option button) for 1_optn, I want the subform 1_frm to become visible. Likewise, when clicking 2_optn, I want the subform 2_frm to become visible. In the properties panel, both forms visibility is set to No.

I have tried creating a Macro and the best I've gotten is using the OpenForm function but that opens up the forms in a new window. I'd set the Macro to the OnClick event for a combo box (as I couldn't get the option button to work) so when "1" is clicked, the form would pop up. But they have to be in the same form. No pop ups. It also has to be an option button, not a combo box or list box.It also has to be a Macro. No Event Procedure coding unfortunately.

View 1 Replies View Related

Forms :: Command Button To Unlock And Lock Fields / Edit Button?

Feb 19, 2014

I have created a web-database (? - There are globes over all the forms and tables icons) based on the Issues & Tasks template. This means that most of the data is entered and seen on the "Main" form, which has two tabs - Open Issues and Closed Issues. I have created a form that allows people at my work to input the necessary data and save it, so that it will show up on one of the two tabs. However, once a record has been created, I want to be initially locked if the ID/PK is clicked, so that data can't be changed or entered inadvertently.

SO, I changed the code so that when the ID/PK for a record is clicked, it brings up a different form, but one that looks exactly like the one that is brought up when entering a new form, but I locked all of the fields so that the information cannot be changed. It seems from what I have read that I can create a button on this form so that when clicked, it unlocks the fields on the form so that they can be changed, and then when clicked again it will lock the fields again. Is this true? If so, how can I do it? Or is there something similar I can do? I have seen codes that I could copy and paste, but I cannot figure out the place to copy and paste codes in Access 2010.

I have changed the Form properties so that Data Entry and all the "Allows" are set to No...

View 9 Replies View Related

Difference Between A Command Button And A 'label' Button

Aug 12, 2005

Hi, I have got a small problem and maybe someone could advise me.
I am creating a customised command button from a label button. The new button works fine but I can't apply the 'requery' function to it, if i do an error occures and i am being prompt to save the data first???? :confused: :


Private Sub Labelsearch_Click()
Me!itemquery.Requery
End Sub

Private Sub Labelsearch_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.Labelsearch.SpecialEffect = 2
Me.Labelsearch.BackColor = 255
Me.Labelsearch.ForeColor = 10092543
Me.Labelsearch.FontItalic = True
Me.Labelsearch.FontBold = True
End Sub

Private Sub Labelsearch_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.Labelsearch.ForeColor = 255
Me.Labelsearch.FontItalic = False
Me.Labelsearch.FontBold = True
End Sub

Private Sub Labelsearch_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
'Come back to initial state when button release'
Me.Labelsearch.SpecialEffect = 1
Me.Labelsearch.BackColor = 16373685
Me.Labelsearch.ForeColor = 8388608
Me.Labelsearch.FontItalic = False
Me.Labelsearch.FontBold = True
End

If I create a command button with the wizard and assign the code :
me!itemquery.Requeryto the on_click event my form is working fine.
Why is his code is not working if I assign it to a label? :o

View 6 Replies View Related

Link Me Up.

Aug 8, 2005

Folks,
i have a small problem wizzing my nut. I copy two tables from mycurrent database to an external database,now i am trying to link these two tables in the external database to the ones in the currentdb. I get a run-time error 3012 telling me that an object 'tblLanguage' is already present.which iam failing to track. Any ideas Please??
Here is my linking code.
Sub LinkMeUp()
Dim tbl As DAO.TableDef
Dim sTableName As String
Dim sThatTblpath As String
Dim dbName As String
dbName = "my_ExternalDatabase"
sThatTblpath = ";Database=" & db_Path & "" & dbName

For Each tbl In CurrentDb.TableDefs
sTableName = tbl.Name
Set tbl = CurrentDb.CreateTableDef(sTableName)
tbl.Connect = sThatTblpath
tbl.SourceTableName = sTableName
CurrentDb.TableDefs.Append tbl
Next tbl
End Sub

View 3 Replies View Related

How Do I Get Rid Of This Link.

Aug 2, 2006

Hello,

The current database I am working on I made it by copying the one I was working on originally. I just realized on the VB window that there is still some relation between them. Because, if I look at the tree on the left of the code window I see it says "GCB (miniGCB)", being GCB the one I copied, and miniGCB the one I am working with.

How can I get rid of the link with GCB?? I want the tree to just say "miniGCB".

Thanks,

View 1 Replies View Related

Link Pdf

Jan 17, 2006

Hello all,

I created a table and linked a pdf file to one of the fields, but when I created a form to display the table contacts, I could not see the attachment or icon or any reference to the linked object. The field in my access table is an OLE object.

Thanks for helping out.

View 7 Replies View Related

How To Link FE To BE Using VBA?

Aug 31, 2005

I have packaged an Access DB (Split) as a run time solution so I can distribute to users without Access.

When I install it on a PC it runs.

If I move the back end to a network, the solution can't find the back end because it has been moved.

Access run time does not include the linked table manager in the toolbar.

Is there code in VBA where I can refresh the link between front and back end.

Ideally I want to write an error handler that will call a sub to prompt the user for the new location of the back end if it has been moved. Then have the user browse to the network location and click on the back end and store that location as a string. Using that string refresh the links.

Any ideas on that?

View 5 Replies View Related

Excel Link

Nov 3, 2005

Hi all,

I have added about 15 links on a form, linking to word and excel documents. The word documents open fine but all of my excel documents pop up with a messae saying the file cannot be open, yet when i just go to the document on my hard drive they all open fine...does anyone have any ideas please. Thanks

View 6 Replies View Related

Link To Excel Doc

Apr 11, 2006

Hi,

I'm new to this so please go easy!

I have an excel document which automatically refreshes data gathered from an access db.
I need to put a button on the switchboard on the same db to open the excel document, basically to make it easy for others to find.
I have tried hyperlinks but it doesn't want to play. It locks the db and then won't refresh the information.
I know i'm missing something blindingly obvious, can someone help?!
:confused:
Thanks
elsiegee

View 1 Replies View Related

Link Tbl Keys...which Way To Go?

May 13, 2006

Hi Forum,
I'm building a db to track computer and user problems for work, where I double as a Client Support Administrator (IT Guy).
I have these tables: (simplified list)

tblComputers
tblPeople
tblCompAssignment
tblProblems

I'm at a loss as to how to link the 'Problems' table. This is where I'll record trouble tickets reported by users.
Incoming trouble tickets could relate to the Computer or to the User's Network Login.
I thought I might have a field in the problems table for UserName and also one for ComputerID, but this seems problematic. Anyone got any ideas?

View 12 Replies View Related

Link To Url From Messge Box

Jun 29, 2006

I am trying to link to a url from a message box with difficulty.
eg the user opens the form and a message box appears asking have the latest datasets been downloaded? If answered yes the form opens, if no links to web address.

has anybody any examples.
Thanks

View 2 Replies View Related

Link One Field To 3

Apr 12, 2008

I have a database which works as an information system for the upcomming olympics.

In tblAthletes is...

AthleteID (Primary Key)
FirstName
Surname
And Various other fields not needed in this problem

In tblResults is...

Gold
Silver
Bronze
Also other field in this table


What I am aiming for is to have Gold AND Silver AND Bronze all as foreign keys of the AthleteID field.

Is there a way to do this or can another way be suggested. I am working on the 2000 version of access.

View 5 Replies View Related

Cannot Link Tables

Dec 24, 2005

Hi There

i am trying to link some more tables to my access front end from the sql server back end

when i select 'ODBC Databases' from the link pop up box, the pop up box just closes

any ideas why, or work arounds would be appreciated

Happy Christmas

View 4 Replies View Related

Link Tables

Jun 20, 2006

Does anyone know how to link tables automatically/VBA?

I'm trying to import files from our DB2 database in which one file is created monthly and instead of manually importing / linking the files manually, I'm looking to have access link to the new file automatically.

The file names are structured as so..

ITM01 (Jan)
ITM02 (Feb)
ITM03 (March)

Thanks

View 5 Replies View Related

Link Forms

Sep 14, 2006

Hello everybody,

I have one dbase with 3 tables wiht 3 forms. One is "custonmers" , "glass" and "lens".

Customers - CusID as primary Keys
Glass - GlasID and CusID primary keys
Lens - LensID and CusID Primary Keys

When I change a specific field (only) I am losing the records on the other tables of the specific customer.

Thanks in advance
xxx ΠΑΟ ΘΡΗΣΚΕΙΑ ΘΥΡΑ 13

View 2 Replies View Related

Link Between Tables

Mar 3, 2007

Hi All

I enter data in a form "WIP" that is based on a table named "WIP" in the form I have a command button. When I activate the command button it takes me into another form "Materials" which is based on a table named "Materials".

The data that I enter into "Materials" is not linked to the data ie Customer details which I have entered into "WIP".

My aim is to be able to report the materials used.

I have tried variations of relationships but am obviously missing something.

Thanks in Advance

Geoffk

View 2 Replies View Related

Table Link

Jun 5, 2007

Is it possible i create one master table and link few table together??
In the mdb that i attached there have 3 table - tblMaster, tblConfiguration1 and tblConfiguration2.
Using the relationship to link tblMaster's field Configuration to other 2 table Configuration field but there only showing 1 table data.
Is it allow in tblMaster able to show this 2 table together??

View 5 Replies View Related

Help With Link Code Please...

Dec 28, 2007

I have a FE database that on initial setup the user will enter the drive letter of the mapped location where the BE resides. The FE will then update all the linked tables to that path. This should work but for some reason the FE locks up (stops responding) when I test this. Any suggestions as to why. It doesn't stop responding until this part of the code:

tdf.Refreshlink

I have looked and it does change the link path, but it locks up.

Dim dbs As DAO.database
Dim dataPath As String
Dim tdf As DAO.TableDef
dataPath = Me.drive & ":IMP1_R2.2_be.mdb"
For Each tdf In dbs.TableDefs
'Not a MSys type table
'If the table has a connect string, it's a linked table.
If Len(tdf.Connect) > 0 Then
If InStr(tdf.name, "MSys") = 0 Then
tdf.Connect = ";DATABASE=" & dataPath
End If
err = 0
On Error Resume Next
tdf.RefreshLink
End If
Next tdf
DoCmd.Echo True, "Done"

View 1 Replies View Related







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