Methods to Open a Form Thru VBA

yeatmanj

Loose Cannon
Local time
Today, 02:52
Joined
Oct 11, 2000
Messages
195
I have a form with a Combo box. It uses an onUpdate method. When you select Invoice It opens a Form for invoice tracking.

Invoice Tracking has a main form with FacID and WorkOrder#, and a subform with various Invoice data.

I know how to open the form with an If Me.NewRecord function, but what I need is a method for opening the form with the WorkOrder# if it has been entered previously.

If workorder# exists then
open with that record.
Else open for entry.

Please Help. I offer Pre-Thanks.
 
Opening with this record works like this:

[Open Form]

dim rs as Recordset
set rs=forms![NameOfForm].RecordsetClone
rs.FindFirst strCriteria ' like "[ID]=146"
forms![NameOfForm].Bookmark=rs.Bookmark
set rs=nothing

Hope you'll succeed!
 

Users who are viewing this thread

Back
Top Bottom