Form resizing when refreshed

parry

MrExcel MVP
Joined
Aug 20, 2002
Messages
3,355
Hi, I have a Tab Control in a form that is resizing. The form is opened as read only, and if the User selects an Edit button, they are then able to edit the record.

For some reason the Tab Control is dropping down when switching to Edit mode.

Heres the code for the Edit button - any ideas on why form is resizing?

Private Sub Command211_Click()
On Error GoTo Err_Command211_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Forms!Form_enter_edit_record.Refresh
Forms!formsearch.Refresh

Exit_Command211_Click:
Exit Sub

Err_Command211_Click:
MsgBox "Please Click the Edit Button to Delete"
Resume Exit_Command211_Click

End Sub
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hi,

A couple ideas:
Check the 'AutoResize' property of the offending form, try setting it to 'no'. Also, it sounds like by pushing 'edit', your users are going right to the table containing the data they need to edit. Instead of that, you could insert a subform that links to the table you need to edit. If you didn't want the user to see the subform until they hit edit, add code like form1.visible = True to the pushbutton event. To make it return to invisible, add form1.visible = False to an event that happens after they edit, like maybe the subform.lostfocus event?

HTH,
Corticus
 
Upvote 0

Forum statistics

Threads
1,221,499
Messages
6,160,163
Members
451,628
Latest member
Bale626

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top