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!

Select subform record, open another form showing same record.

Status
Not open for further replies.

messmerized

Technical User
Jan 7, 2003
11
GB
Hi, need some help with this if possible.

I have a Customer Details form with a subform in datasheet view showing the quotes issued against a selected customer.That was the easy part!! What Ineed to do now is:

Select a record in the subform, click on a comand button in the parent form (Customer Details) which will open the quotes form and display the previously selected record. If all that makes sense.

Opening the quotes form is ok, what I cant seem to get figured is displaying the previously selected record.

I would appreciate any assistance with this or info on where to look in help files etc.

Thanks in advance
ChinChin
[cheers]
 
you could set up a query that looked at a unique identifier in the subform.
eg
select *
from tblDetails
where ID = Forms![Frm]![SubFrm]![ID_Field]

then make that the data source of your new form
 

Thanks for the reply, although it was not quite what I was after I appreciate it.

Eventually got it sorted by putting a command button on the main form with the following code.

StartCode

gstrWhereQuoteID = "QuoteID = " & SubfrmCustomerQuotes1!QuoteID & ""

If SubfrmCustomerQuotes1!Region = "UKD" Then
DoCmd.OpenForm "Quotes UKDom", , , WhereCondition:=gstrWhereQuoteID
DoCmd.Close acForm, Me.Name
Forms![Quotes UKDom].SetFocus
End If

ChinChin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top