Modules & VBA :: Linking To Pervasive Table

Apr 21, 2014

I'm using this code to link to a ODBC Pervasive db table:

Quote:

Public Function RelinkODBC()
PastelServer = "PasServer"
On Error Resume Next
CurrentDb.TableDefs.DELETE "TranLeave"
Set tdfLinked = CurrentDb.CreateTableDef("TranLeave")
tdfLinked.Connect = "ODBC;DSN=" & PastelServer & ";DBQ=" & PastelServer
tdfLinked.SourceTableName = "TranLeave"
CurrentDb.TableDefs.Append tdfLinked
CurrentDb.TableDefs.Refresh
End Function

The resulting table is however read-only.However if I link to the table "manually" myself it results in a read/write table.

View Replies


ADVERTISEMENT

Modules & VBA :: Linking Text Box To A Field In A Table

Jul 28, 2015

I have made a form (frmLogin) that is used as my homepage and has command buttons that take the user to other forms. However, I am trying to make the txt box on the frmLogin be able to filter by a date found in a table (tblDefaults) when the form is opened.

I am trying to pull the value from the tblDefaults form the column "DefDate". Whenever I open the form I get an error that says "Compile error: Invalid use of property." Here is the VBA code that I have written. Also when debugging it highlights ControlSource in my VBA code so that seems to be where the problem is but I can not figure out why.

VBA code:

Private Sub Form_Load()
Dim SQL As String
Dim db As Database
Dim rs As Recordset

[code]....

View 2 Replies View Related

Modules & VBA :: Linking Subdatasheets To Main Table

Oct 29, 2013

I have a main table and multiple other tables that I want to link to each row of the main table.The main table "Data" consists of columns (Name, x, y) where "Name" is the primary key and all values are unique.Each of the other tables have columns (Name2, z) where the value of "Name2" is the same in each row and also corresponds to the table name.

I want to make each table a subdatasheet of "Data" where each row in "Data" shows the values in the table corresponding to its name. (i.e. where Name = Name2).Below is what I have so far, but the code doesn't work because linkchildfields and linkmasterfields need to be run from a subform.(?)

The error I am getting is 'Property Not Found' once the code reached the linkchildfields line.

Quote:

Sub STS()
Dim i As TableDef
Dim db As Database
Dim tbl As TableDef
Set db = CurrentDb()
Set tbl = db.TableDefs("Data")

[code]....

View 9 Replies View Related

Modules & VBA :: Linking CSV File

Nov 18, 2013

I have opening a csv file from access changing the date to a number and then linking it to access and then doing a lookup.Problem is the lookup only works if i open the csv file and go to saveas and click yes on the message attached and then when i close the csv it makes me do this once more.

If i do the above it will work but if i dont, the lookup wont work.i dont want the user to have to do this to the files.

Code:
Private Sub LoadRef2Cal_Click()
On Error GoTo Err_LoadRef2Cal_Click
Dim s As String
Dim i As Long
Dim ExcelWorkbook As Excel.Workbook

[code]....

View 1 Replies View Related

Modules & VBA :: Linking All Option Groups

Mar 13, 2014

I have 26 different option groups all with numeric values set for YES , NO, and N/A.

I attempted code to have the code read if the frame values were 1 Or 3 for all frames then a text field would read as "Pass" or it would be "Fail" but its not working. How to link all the options groups so that if YES or N/A have been selected then it will generate a PASS but if any of them selected NO it will be a FAIL.

View 3 Replies View Related

Modules & VBA :: Access 64 Bit Linking Tables

Jul 10, 2013

I have a code for linking tables. It works on Access 32 bit.I modify the code for 64 bit (include PtrSafe after all Declares, etc...)But it doesn't work.When I try to chose database in dialog window, my program closed.

Code:
Public Function GetDbPath(path_name As String) As Integer
Dim i As Long
i = MsgBox("The path to database is incorrect" _
& Chr(13) & "Chose new path?", vbOKCancel + vbExclamation)
If i <> vbOK Then
DoCmd.Quit
Exit Function

[code]...

View 3 Replies View Related

Modules & VBA :: Linking Back End Database With Password?

Apr 28, 2014

I have a Back end (with password) which resides in a netdrive while the front end is installed in each individual users desktop, the problem is, some of the users netdrive was mapped in a different way (different letters..some are J others are G). I'm looking for code that I can relink the database to the front end in runtime, I did try to look in the net but I can't find anything that I can put the password as parameter.

this sample code from Dev is good, but i got an error because the database requires a password.where i can put the password?

Code:

Function fRefreshLinks(NewDbName As String) As Boolean
Dim strMsg As String, collTbls As Collection
Dim i As Integer, strDBPath As String, strTbl As String
Dim dbCurr As Database, dbLink As Database
Dim tdfLocal As TableDef

[code].....

View 8 Replies View Related

Modules & VBA :: Dynamic Linking Of FoxPro Tables

Dec 11, 2013

I'm looking for some sample VBA code that dynamically creates a link to Visual FoxPro 9 table. Our group has a number of end user FoxPro applications, and as FoxPro is reaching the end of its life in January 2015, we need to replace it.

A lot of the processing we do uses tables with a date embedded in the name, e.g. MyData_20131211.dbf. We'd like to be able to let our users to use Access queries that point to these tables without having to manually create the ODBC link each day. Is there a way to set up a link once, then use VBA code to dynamically change the table it points to?

For example, we set up an ODBC link table to MyData_20131211.dbf, and rename the link table in Access to MyData_Today. Then tomorrow, the VBA code would change the link to point to MyData_20131212.dbf.

An alternative would be to dynamically recreate the link each day.

As the tables are large, we don't want to import them into Access if we don't have to.

View 3 Replies View Related

Modules & VBA :: Linking Directly To Access Form From Email

Sep 30, 2014

I have a form which on selecting a command button sends out an email to a manager to say a specification is ready to be reviewed (this contains a link to a sharepoint site where the spec resides). The "approval" details are stored in by DB also so I would like to have included in that email a link back to the access db and the particular record so the person receiving the email can easily approve, if that makes sense.

Here is my code for generating the email (at the point "To approve please click here" is where I would like my link to go):

[i][i] Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "<font size=""3"" face=""Calibri"">" & _

[Code].....

View 5 Replies View Related

Modules & VBA :: Linking External Tables To Current Database?

Mar 16, 2015

I was wondering if it was possible to link random external tables to the Active Database through VBA. I would like to run the code that would open up a dialog box that would let the user select the database as well as the tables within that database that the user can select to link to. I am able to select the database and but not able to select the actual tables. The tables will be random so I can't make a constant statement for a specific database.

View 1 Replies View Related

Modules & VBA :: Automatically Linking Database With ODBC Connection

Jun 26, 2015

I am looking to automate the process of linking my Access DB with an ODBC connection to an SQL DB with VBA (unless there's an easier way to do it?) - some sample code - if this is possible at all?

View 2 Replies View Related

Table Linking

May 19, 2005

Ok...I have an issue that I don't know how to resolve.
I have a table called 'orders' in the orders table there is a place for " quantity', 'colours' and per unit. The cost per unit is based on quantity and colours.
For example: 12-35 shirts 1 colour are $2.85 per unit. 12-35 2 colour are $3.50 and so on.
I would like to be able to put in the quantity and # of colours and the Unit price fills in a field.
I don't know how I can accomplish this.

View 2 Replies View Related

Linking Just One Table

Sep 4, 2006

I have created an Access database application that is stand alone for each account manager/client at our business except for one table that I want shared as a source of data across all separate databases that are created.

I've investigated automatic Database Splitting and this works, except I only want the one table to be split and the others remain unique to each database.

I tried exporting the table in question to another Access database and then linking the table into each other database, this seems to work except that referential integrity can't be set up as it was. Is there any way to keep the integrity between the external database and the databases it links to?

Thanks in advance for any advice.

View 1 Replies View Related

Linking A Table

Jan 20, 2005

Hoi,

I'm using 2 databases. The first is my working database (LiTiMA.mdb) the second database (LiTiPA.mdb) is just for the password table.
There is no link between the 2 databases. But when I open a form for editing the password in LiTiMA, a connection need to be created between the 2 databases.
If the form is closed the connection need to be removed.

Does someone know how to do this?

thanks
Koen

View 4 Replies View Related

Modules & VBA :: Update Open Form After Linking To A New Backend Database

Mar 18, 2014

I have an Access DB with a form that allows the user to select a new backend database. I can connect to the backend and then .refreshlinks but nothing on the form is updated. I have tried requiring the form but that doesn't do anything. I've tried loads of other things, refresh, recalc etc., but nothing updates the open form.

The only way I have managed to get it to work is to close the form and reopen it, then it shows the data from the newly linked backend database.

While it works, it doesn't look good but also there seems to be some problem with it because eventually it reports an error saying "cannot open any more databases" and when clicking OK comes back with "An error occurred while sending data to the OLE server (the application used to create the object" and a whole bunch of other messages.

I think it might have something to do with the fact that the form has a number of MS graphs open on it, but I'm not sure. Also, I can't track down a particular line of VBA code which causes this error.

how to update a form after changing the backend database.

View 14 Replies View Related

Modules & VBA :: End User Form - Linking Multiple Toggle Buttons

Mar 11, 2014

I have built a end user form with multiple toggle buttons with "Yes/No" properties. I am wanting to link the buttons together, so if all have been selected/pressed it will read "pass" in a text box, but if even one is not selected it will read "fail". I was successful with the programming for one but not sure how to link them.

View 2 Replies View Related

Linking Paradox Table

Oct 30, 2006

I have an access dbase trying to link a paradox table. I have Office 2003 and BDE 5.01 was installed on my machine. When I try to link to a paradox table its giving me an error "Unexpected Error from xternal database driver (11265)". On the other hand, I have Office XP on my laptop and BDE 5.01 installed, I tried to link to a paradox table and it works. :eek: :confused: What can I do to link to a paradox table using Office 2003? :confused:

View 1 Replies View Related

Table Linking Query

Apr 1, 2008

Hi there,

The aim of this (as part of a bigger solution) is to create an entry system where users can enter jobs in, assign a resource to the job and give the resource a cost. The conditions are that resources can be on more than 1 job, more than 1 resource can be on a job.

Obviously entering in resources manually is not a good solutioon (eg having 20 resource fields) as it is now. I want to create a relation between tables to achieve something better.

Let's say I had (for illustration sake) 2 tables, one which is a list of people and one which is a list of jobs. I want to be able to assign a person to a job for x amount of time (defined by a start date and end date in the job table) at cost y.

So we could have a field for the people table which would relate to the job id and a field for rate in the job db. However, people can be on more than 1 job (eg after doing one they do another) and there can be multiple people on a job (having one field for rate rendering it useless)

How can this be done in the most efficient way so that any job could be looked at historically and have the relevant rates etc? Would I have to create another table with rates relating to the job ID and person ID? This would allow for multiple resources per job and to have a rate assigned for each resource.

eg if person ID = 1 and job id = 1 then fetch rate etc and display in a list, and to calculate total cost simply sum all rates where job id = 1?

Thanks

View 3 Replies View Related

Linking Datawarehouse To A Table

Nov 18, 2006

Hi guys,

I have been linking text delimited file to my Access table. The text delimited file is generated by a report run by our in-house system. I've been able to do this. Now, I want to learn how to link a datawarehouse (ODBC?) cube to Access. Is there a tutorial somewhere I can perhaps start? I tried to search this form by typing "Linking datawarehouse" I only found one post.

Thanks

View 6 Replies View Related

Table Not Linking To Query

Sep 25, 2007

I am pretty new to creating relationships between tables. I have a main form with subforms embedded. I tried running queries from the main form and they run just fine. I also run from the tables linked to the subforms just fine. however, when I try to run a query for a report that takes data from the main form and joins with data from the tables linked to the subforms all the data cells are blank. I have a linking table which is also blank. All the forms are linked by the same program ID number. Any ideas on how to resolve this? Thanks

View 14 Replies View Related

Linking Records In Same Table

Oct 10, 2007

Hi,
I have been thinking of allowing our users to be able to link records together within our database.
We have a CRM system that lists customers and their details of mortgages and other insurance related products which they have. Some entries maybe linked in some way, possibly other family members etc.

My question is, is it possible to perform this kind of action? So they can then see relationships between either related records (ID ref etc).

I'm sure I've seen this in SQL based applications, but haven't come across it within Access.

Thanks
Matt

View 2 Replies View Related

Linking An Expression With A Second Table

Jan 2, 2006

When running a query i have created an expression which is simply 2 fields joined together. JOBLOC:[JOB]&[LOCATION]. I want to link this expression with a field in a second table [SCOPE], but for the life of me can't remember how i did it. Either in query design or SQL.

Thanks for your help!

View 1 Replies View Related

Linking Table Question

Jan 30, 2007

Hi.
I have a table with Basic Client Data including their program start date.
One type of service they might, but not necessarily, get is job training. So I have a Training table.

I need a query that will show all client's names (found in Basic Client Data) with a specific start date but exclude anyone who has a specific job training service.

How to set up?

Russ

View 1 Replies View Related

Linking Form To Table?

Apr 10, 2005

Hi there,

I just added a new field to a table but i now need to add the field into a form so the table can be update. However when i open the field list to assign/bind the control the new cloumn is not present on the field list.

How do i add a new field which i have entered in the table to the field list?

Thanks Mark Flavin

View 5 Replies View Related

Form And Table Linking

May 28, 2005

Hi, i'm trying to get a field to only allow data to be entered that is in a table
e.g. i have a table which has a list of country dialling codes in it. In my form i want to only allow valid country codes to be entered-i.e. the ones which are in the table?
Ive tried coming up with different validation rules but cant seem to do it
Can anyone help?

View 2 Replies View Related

Linking Form To Table

Sep 15, 2005

I am creating a Risk Management Database at work. I have created a tab with options to choose, as to log the risk relevant.

i.e. I have a catagory, subcatagory and then Risk boxes

When saving the record it will save the risk but it will not save the catagory, and the subcatagory options choosen? I have a seperate table for this information to appear, Does anyone know how I can make this happen without stopping it from shortening the catagories down.

I hope this make sense. I am sorry I am a little rusty in Access 2003.

Thanks,

View 1 Replies View Related







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