Update Forms

G

Guest

I have three tables/forms. Table 1 - tbldemographics w/ MedicalRecord as PK.
Table 2-tblDeviceInfo w/ DeviceID (Auto) as PK and MedicalRecord as FK. Table
3 - tbl3MoFU is a 3 month follow-up to the device, 3MoFUID (auto) is PK and
DeviceID is FK.

tblDemographics is a one-many to tblDeviceInfo whereas tblDeviceInfo is a
one-one to tbl3MoFU.

The way I set my form up is that frmDeviceInfo is a subform of
frmDemographics. Then I have a button on frmDeviceInfo that links
frmDeviceInfo to frm3MoFU. (I used the Wizard).

My problem is that when I open frmDemographics it properly displays all the
information with the appropriate subform information. When I click my button
it also pulls up the correct information. But when I go to add a new Device
and I click on the button again, it displays info for the previous device. Is
there a way that when I add a new device and then click on the 3 Month button
that I can have it updated to that new device?

I hope that this makes sense, I appreciate your time. Ryan
 
P

Penguin

Using Me.Requery in your code to requery the current form. Use this
example to requery a control on another form:

Dim MyControl As Control
Set MyControl = Forms!FormName!ControlName
MyControl.Requery

Hope this helps
 
G

Guest

Penquin,
I am fairly green with all of this. Where would I be able to put this code?
Thank you for your time, Ryan
 

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