Form display works and then doesn't (1 Viewer)

mcdhappy80

Registered User.
Local time
Today, 07:03
Joined
Jun 22, 2009
Messages
347
I have a form with a button that opens another form:



The code for a button is:
Code:
Private Sub btnSpisakDece_Click()

On Error GoTo Obrada_Greske

DoCmd.OpenForm "dtshtFrmDete", acFormDS, , , acFormReadOnly, acDialog

Izadji_Ovde:
Exit Sub

Obrada_Greske:
MsgBox Err.Number & " - " & Err.Description, vbInformation, "Greska je!"

Resume Izadji_Ovde

End Sub

When I click on a button the form dtshtFrmDete opens like on the above picture which I don't want. I tamper with its properties and make it right but I think after I compact and close and open database again, it opens again like on the picture.
Can someone help me with this. Here are the forms dtshtFrmDeteproperty settings. Maybe I've done something wrong here?



I just wanna form to open in datasheet view (and its datasheet by default), read only, not movable, and not being able to resize, with horizontal scroll bar only.

Thank You.
 

ajetrumpet

Banned
Local time
Today, 00:03
Joined
Jun 22, 2007
Messages
5,638
in the united states, if you size a form in design mode, and you close it after doing so, it doesn't give you the option to save the positiion, size and look of it, thus you are back to square one. if you are sizing this form manually after you open it with the code that you posted, you are stuck because the you opening it as READ ONLY! you can't edit it obviously when you do that. this is generally how you get a form to change size, position and dimensional properties manutally:

1) open the form in DES view.
2) move it around, size it do whatever you want
3) BEFORE you shut it down or even go out of the design mode for that matter, right click on the TITLE BAR and choose SAVE from the drowdown menu that appears in order to save everything you have specifically done to it. that way, the next time you open the form, it will retain all the dimensions and positions on screen you told it to do before. if you don't do it that way, you're basically up the creekl, so to speak. :)
 

Users who are viewing this thread

Top Bottom