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

Form won't open in default 'datasheet' view? 2

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hi,

I've just created a new form, set it to only allow "datasheet" view and set the default view to "datasheet" only when i issue the command...
Code:
DoCmd.OpenForm "Grade_History"
the form is opening in form view?

Why is this happening, I don't normally have this problem with forms?

thanks 1DMF

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
Ok , i have found a workround
Code:
DoCmd.OpenForm "Grade_History", acFormDS
But why was it ignoring the default view property set on the form?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
How are ya 1DMF . . .
Microsoft said:
[blue]View Optional [blue]AcFormView[/blue].

AcFormView can be one of these AcFormView constants.
acDesign
acFormDS
acFormPivotChart
acFormPivotTable
acNormal [blue]default[/blue]. [purple]Opens the form in Form view.[/purple]
acPreview
If you leave this argument blank, [purple]the default constant (acNormal) is assumed.[/purple][/blue]



See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Duane,

isn't DoCmd.OpenForm "FormName" with no other parameters meant to open the form in 'default' view?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
1DMF . . .

Did you not see my post dated [blue]3 Feb 11 4:14[/blue] ?

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
sorry missed that AceMan.

So you're saying it does use 'default' so therefore shouldn't it open in the view I set as the default view property of the form?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
So you're saying it does use 'default' so therefore shouldn't it open in the view I set as the default view property of the form?"

No he said the docmd has its own default parameter which is AcNormal. He ,did not say it uses the forms default setting.
 
ok, so what does acNormal mean if it isn't 'open the form normaly using any properties set on the form'?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
Well, the Normal way to open a form seems to be Form view ...
 
thanks PHV,

Bit of an ambiguous one really if the form is dataset, then normal view is dataset, otherwise the form looks far from normal (or way you expect it!) but i see what your saying.

Form -> Form View!

;-)



"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
1DMF said:
[blue] ... So you're saying it does use 'default' so therefore shouldn't it open in the view I set as the default view property of the form?[/blue]
There are properties you set in [blue]form design view[/blue]. Then thre are arguements you set in the [blue]DoCmd.OpenForm[/blue] method. The properties you set in the forms [blue]design view[/blue] are over ridden by the arguements in the [blue]DoCmd.OpenForm[/blue] method ... pure and simple! As as an example ... in design view you can have the form set to open in [blue]continuous view[/blue] ... but when you open the form you use:
Code:
[blue]   DoCmd.OPenForm "FormName", acFormDS[/blue]
The form will open in [blue]DataSheet View[/blue] despite its property setting to open in [blue]continuous view[/blue]! ... get the picture!

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
thanks for the info AceMan.

I appreciate the overriden nature of the arguments vs properties, it's just the definition of 'Normal' that i needed clarification of.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top