Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / May 2008

Tip: Looking for answers? Try searching our database.

Search subform, goto record on main form.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
suguy - 23 Apr 2008 17:12 GMT
I have a main form with Customer Info, and a subform with invoices.. they are
linked with the custID.

I would like a 'goto invoice' text box.. This would when cmdGoTo is clicked
take the value of the text box, search the subforms InvoiceID field and show
this record, AND update so the customer info record is correct on the main
form. Is there any easy way of doing this? If i was to just perform a search
on a subform, will it still update the main form on a requery? hmm help! any
ideas

R.
Evi - 01 May 2008 20:47 GMT
I couldn't see the reply to this. It seems to have got missed.
Finding a record in the subform should not be a problem. See if you can see
where to put your own form, subform and control names in the code below

Dim frm as Form
Dim MyInvoice As Long
'assumes InvoiceID is a number field

If Not IsNull(Me.NameOfYourTextBox) Then

MyInvoice = Me.NameOfYourTextBox
Set frm = Forms!NameOfMainForm.NameOfSubform.Form

frm.RecordsetClone.FindFirst "[InvoiceID]=" & MyInvoice

   frm.Bookmark = frm.RecordsetClone.Bookmark

'goes to record in subform

End if

But the next bit didn't make sense

"AND update so the customer info record is correct on the main form"

Update what?

Evi

> I have a main form with Customer Info, and a subform with invoices.. they are
> linked with the custID.
[quoted text clipped - 7 lines]
>
> R.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.