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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show a combo box only on new record

Status
Not open for further replies.

Albano

Instructor
Dec 11, 2000
221
PT
Hi,

I have a "Continuous Forms", and i whant to show a combox only on the new record, and hide on the existing records, can this be donne?

Thanks,

Albano
 
In the Current event procedure of the form:
Me![name of combo].Visible = Me.NewRecord

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I can use that solution, but it's possible to make the combo allways invisible on existing records?
 
Sure, just a slight tweak here:

In the combobox's Properties Box goto Format and set

Visible to No

Code:
Private Sub Form_Current()
  If Me.NewRecord Then
     YourComboBox.Visible = True
  Else
     YourComboBox.Visible = False
End If

Now it'll only be visible on new records.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
I assumed that PHV's answer wasn't working from your followup question, but it should work just fine (and it's shorter!) Are you having probems!

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Has anyone tried the solution offered by PHV? I think you will find it does exactly what is required, but on one line as Me.NewRecord will evaluate to true or false accordingly.
 
will this work on a continus form? phv or missingliq solution?

I will try my best to help others so will others do!!!!!
IGPCS
Brooklyn, NY
 
IGPCS said:
[blue]will this work on a continus form? phv or missingliq solution?[/blue]
TheAceMan1 said:
[blue] A new record is a New Record in any view! . . .[/blue]

Calvin.gif
See Ya! . . . . . .
 
but as its a control object on a form once its visible its visble all the continus forms unless its in the form header or footer

I will try my best to help others so will others do!!!!!
IGPCS
Brooklyn, NY
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top