Open Forms

R

Ruben

Hi, I have a form which display info about Measurement
Devices all info comming from tblMeasurementDevices.
There's a second form frmDeviceDocumentation from
tblDeviceDocumentation. There's a one to many relationship
between tblMeasurementDevices & tblDeviceDocumentation.

I'm using the following code in a cmdButton at
frmMeasurementDevices

DoCmd.OpenForm "frmDeviceDocumentation", acNormal, , strSQL

Where strSQL = "[MDID] Like " & Me!MDID

Who can I make that if there's no match for the MDID when
opening frmDeviceDocumentation the MDID is set to the same
value from the one side of the relationship?

thx.
 
B

Byron

Using code you can us an sql statement to count the
number of records from the second table prior to opening
the form. If there are records there then open the form,
else do not.

HTH

Byron
 

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