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 / Forms / December 2007

Tip: Looking for answers? Try searching our database.

Default value

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Igor G. - 05 Dec 2007 09:35 GMT
I have two version of "main" Form (Form1... Form2) with Combo Box (Combo35).
From this form I open another form where Default Value in one Field (Text
Box) must be value from Combo35 in Form1 or Form2.
How to detect which form is open and use value from Combo35 in opened form
to default value in Text Box in second form?
Thanks!
Ofer Cohen - 05 Dec 2007 11:13 GMT
Try

If CurrentProject.AllForms("FormName").IsLoaded Then
    '  Action if form is open
End If

Signature

Good Luck
BS"D

> I have two version of "main" Form (Form1... Form2) with Combo Box (Combo35).
> From this form I open another form where Default Value in one Field (Text
> Box) must be value from Combo35 in Form1 or Form2.
> How to detect which form is open and use value from Combo35 in opened form
> to default value in Text Box in second form?
> Thanks!
Igor G. - 06 Dec 2007 09:30 GMT
I try some code in On Current properties, but without success...
What's wrong?

If CurrentProject.AllForms("Form1").IsLoaded Then
   Me.txtLogIn.DefaultValue = Chr$(34) & Me.[Forms]![Form 1]![Combo35] &
Chr$(34)

If CurrentProject.AllForms("Form2").IsLoaded Then
  Me.txtLogIn.DefaultValue = Chr$(34) & Me.[Forms]![Form 2]![Combo35] &
Chr$(34)

Else
  ....
End If
End If

Thanks!

> Try
>
[quoted text clipped - 8 lines]
> > to default value in Text Box in second form?
> > Thanks!
Ofer Cohen - 07 Dec 2007 08:08 GMT
Sorry for the delay,
In the criteria you used "Form1" and in the reference to the combo you used
"Form 1", with space between the name and number.

Signature

Good Luck
BS"D

> I try some code in On Current properties, but without success...
> What's wrong?
[quoted text clipped - 26 lines]
> > > to default value in Text Box in second form?
> > > Thanks!
 
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



©2008 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.