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!

Default client number

Status
Not open for further replies.

jas0n

MIS
Mar 9, 2005
3
US
I have a form with command buttons that launch a new forms for users to input data. What I want to do is when they click on that button launch the form but have the client number of the record they were on, generate onto that new form and they just fill in the rest of the data.
 

Hi,

Just you have to make the text box which have recordsource to client number on new form and the on this text box property you have to write the following line in the defaultvalue :

Forms![Form1]![Text0]

Form1 : the first form which you have button
Text0 : the name of the text box which is client number shows in first form

then when your second form will open on the first form you will have same client number on the second form

Best Regards
ALI fekri
 
Do you have a Record Number field? Try this:

Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FormYouWanttoOpen"

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

You can add a DoCmd.Close form to close the current form first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top