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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open Form with Link to Field

Status
Not open for further replies.

Judalie

Programmer
Mar 25, 2002
40
US
I have a problem and it is perplexing more so because I have solved it before and have now spent so much time trying to figure out what I did before..

I have a command button on a form that opens another form, which has a field that is linked to a field on the original form. I want the form to open with the data from the original field populated...

I also want the form opened to be smaller and still view the original form in the
background.

I'm a beginner and am getting so frustrated because i was able to do this and now
have spent several days and can't remember what I did before..
any help will be so much appreciated!!!

 
I found the answer to form being smaller (popup)

but can't seem to make the linking work...
 

GO to the popup form and open its recordsource (query or SQL statement) into design view.

Select the key field and set its Criteria to the key field control on the first form.

Forms!frmFirstForm!txtID

This will force the popup form to open to records related to whatever the current record is in the first form. You can also achieve the same result any of a number of ways through VBA code behind your command button or the popup form's open event.

Chers, Bill
 
Dear Bill,

thanks so much ....i'm headed that way NOW!!!!

(i thought the vb script should do it too and just by using the wizard to
create the command button which opens the popup form it automatically
creates this code:

stLinkCriteria = "[AdopterNum2]=" & Me![AdopterNumber]
DoCmd.OpenForm stDocName, , , stLinkCriteria

but the popup form opens with a 0 in this field....)

i'm going to do your instructions...and i'm very appreciative of this
i was beginning to panic..have a deadline!!

here's to you/judy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top