I have 2 Access DB with linked tables

G

Guest

In DB 1 is frmTokenDelivery and in DB 2 are tblImageBuild and
tblHardwareRequest. I link to the tables from DB1. The DBs belongs to two
seperate departments. The two departments perform seperate operations that
must be completed before hardware is delivered to the user or to another
dept. for further action.

My Need:
I want to display a date in DB 2 on frmTokenDelivery in DB 1. Field in DB 2
is ProDate (i.e projected dated). Sorry for the long explaination. Any
assistance will be highly appreciated!

With regards,
 
J

James A. Fortune

Sokan33 said:
In DB 1 is frmTokenDelivery and in DB 2 are tblImageBuild and
tblHardwareRequest. I link to the tables from DB1. The DBs belongs to two
seperate departments. The two departments perform seperate operations that
must be completed before hardware is delivered to the user or to another
dept. for further action.

My Need:
I want to display a date in DB 2 on frmTokenDelivery in DB 1. Field in DB 2
is ProDate (i.e projected dated). Sorry for the long explaination. Any
assistance will be highly appreciated!

With regards,

I'm not sure I understand your problem exactly, but the following
example might give you some syntax clues:

I created the following query:

qryGetProDate:
SELECT * FROM [M:\Databases\DB2.mdb].tblImageBuild INNER JOIN
[M:\Databases\DB2.mdb].tblHardwareRequest ON tblImageBuild.HID =
tblHardwareRequest.HID ORDER BY tblImageBuild.HID,
tblHardwareRequest.DeliveryDate;

Then behind frmTokenDelivery:

Public Sub txtDeliveryDate_AfterUpdate()
txtProjectedDate.Value = DLookup("Max(tblHardwareRequest.ProDate)",
"qryGetProDate", "tblHardwareRequest.DeliveryDate = #" &
Me!txtDeliveryDate.Value & "#")
End Sub

I changed the value of the DeliveryDate textbox. The ProjectedDate
textbox filled in the value it found. Note that the code should not
have any line wrap. What I actually ran used First instead of Max so I
needed the ORDER BY in the query to ensure the order I wanted. I hope
this helps.

James A. Fortune
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top