how to get a form to only appear in 'Data sheet view'?

rvd48

Registered User.
Local time
Today, 22:13
Joined
Feb 2, 2004
Messages
123
i have a form which needs to be in Data sheet view. but when i double click on it in the objects window it goes into 'Form View'.

i've changed the properties to: Allow Formview as 'No' and the other views bar Data sheet' view.

how do i make it go into 'Data sheet' each time i double click on it? :confused:
 
View the form's properties and change the Default View (format tab) to Datasheet.

Andy
 
thanks for that spacepro.

i have another question, when opening my database i would like my 'Navigation form' which opens firstly, i would like it open in medium size, not 'maximise'. what settings do i need to change?
 
spacepro said:
View the form's properties and change the Default View (format tab) to Datasheet.

Andy


if i open this form through the objects window, then it opens in datasheet view which is fine. but on my navigation form, i have created a macro which links to this form. everytime i click on the marco. the products form appears in design view, not datasheet view.

what settings do i need to change? :confused:
 
rvd48 said:
thanks for that spacepro.

i have another question, when opening my database i would like my 'Navigation form' which opens firstly, i would like it open in medium size, not 'maximise'. what settings do i need to change?

Do you have a autoexec macro on startup? or code on the form Open event.
 
rvd48 said:
if i open this form through the objects window, then it opens in datasheet view which is fine. but on my navigation form, i have created a macro which links to this form. everytime i click on the marco. the products form appears in design view, not datasheet view.

what settings do i need to change? :confused:

What command are you using in the macro to link to the form?
 
spacepro said:
What command are you using in the macro to link to the form?


i just created a macro using the wizard via the toolbox.
 
Please post what code you have on the onclick event of the button.

If you have used the wizard for the cmd button to open a form then it will not maximise unless you have code on the button or code on the open form event of the opening form for it to maximise.


Or post a small db with the majority of your object with no data in, so that I can pinpoint the reason why.

Andy
 
the code for the macro is:
Code:
 Private Sub Command15_Click()
On Error GoTo Err_Command15_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Products"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command15_Click:
    Exit Sub

Err_Command15_Click:
    MsgBox Err.Description
    Resume Exit_Command15_Click
    
End Sub
 
The code looks ok. Bog standard wizard generated.

Do you have a macro called Autoexec?

Do you run a macro on startup which as the command Maximise in?

Do you run any code which maximises the form?

For example in VBA:
Code:
docmd.Maximise

If you are not sure goto the VBA editor and do a search for the above code.

Andy
 
same problem

hi rvd48, i'm having the same problem with my form! and i'm just using a command button that opens the form and displays all the data, when i open it manually from the db window it opens in datasheet format, when i open it with the command button it opens in continous form format!! have no idea what to do, have you managed to fix it?
 
rvd48 said:
if i open this form through the objects window, then it opens in datasheet view which is fine. but on my navigation form, i have created a macro which links to this form. everytime i click on the marco. the products form appears in design view, not datasheet view.

Are you talking about a command button on a form made with a wizard, or are you talking about a command button that's linked to a previously created Macro object in your database window?

If you're talking about a Macro object (possibly triggered from a command button), you probably need to open it in Design View from the Database Window, find the "OpenForm" step that is (probably) in the macro, and then look at the properties at the bottom - one of properties is "View" and you want to make sure this says "Datasheet", not "Form".

However, if you're using a command button with coding instead of a macro attached, then your problem will lie in the "on click" event code (since your form opens fine in Datasheet on its own).
 

Users who are viewing this thread

Back
Top Bottom