Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table Relationship with Linked txt table. 1

Status
Not open for further replies.

MrBillSC

Programmer
Aug 6, 2001
592
US
I am adding a linked txt table named TblCustInfo to my mdb. The table is automatically downloaded from the main frame to the network each night. The database reads the linked table just fine. I have set up a table relationship between the LINKED table (TblCustInfo) and one of my mdb tables (TblBackflow). The fields used to establish the relationship are both text (AccountNum). The LINKED table (TblCustInfo.AccountNum) has a default size of 255 characters. The mdb table (TblBackflow.AccountNum)has a size of 7. My problem is that when I try to include the new LINKED table with the mdb table in a form, the form comes up blank (no fields or labels) and the navigation buttons are greyed out. Does anyone have any idea what I am doing wrong. How do I establish a relationship between the LINKED table and the mdb table?
 
I don't understand how you "include the new LINKED table with the mdb table in a form". Do you join them with a query and use that as the data source?

 
When I created the form I used the form wizard and selected fields from both tables. In my table relationships I have linked the tables. How ever the LINKED .txt table does not have a key or index.
I tried putting the LINKED table in a subform and link the subform to the main form. At least the form isn't blank and data from the main form shows up, but the subform containing the LINKED .txt table does not retrieve any data.

Thanks for responding. Any suggestions will be appreciated.

MrBill
 
You mention a subform now which begins to make sense. If the subform will open and display data properly on it's own (i.e. open the Subform itself form the forms menu) then your problem is in the link master and link child fields settings. If you are sure these are set to the correct fields and it's still not working then clearly there are no matches. This could be because the mainframe gave you a padded file.

To prove it in a query,
Code:
SELECT * 
FROM tblcustinfo inner join tblbackflow on tblcustinfo.accountnum = tblbackflow.accountnum

This should show you all the records where the accountNum matches. If this query is blank then you know there are no accountNum matches at all. In which case you can started dissecting the data in tblcustinfo and see if every accountNum happens to be right padded with spaces to make each record exactly 255 characters long.
 
Thanks PCL for responding.

You were correct. There was padded data in the LINKED table. This has been corrected and I also sorted the LINKED table via the linking field (AccountNum) and everything seem to be working now.

Here's a star for you.

Thanks,
MrBill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top