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

Open form in edit mode...

Status
Not open for further replies.

BrentJ

Technical User
Aug 2, 2004
29
US
I have a form that is opened from the switchboard in edit mode but no records are shown. The form is linked directly to a table and has no filters. I can use Remove Filter/Sort to view records but I cannot do it via a macro. I have tried setting the Allow Filters property to No but this only removes the Remove Filter/Sort option and does not display the records.
 
BrentJ
Are you using VBA code or a macro to open the form?

Regardless of which, it sounds to me as if the form is being opened in "add new record" mode rather than "edit."

Tom
 
I wish that was the case. That is the way that it is acting but that is not the case. It is being opened with the switchboard in edit mode.
 
Sounds like a gremlin somewhere.

Try putting a new command button on the Switchboard and see if it works, or acts the same. If it works, then you can remove the faulty one. If it doesn't, the problem lies elsewhere.

Just use the wizard to create the command button. The code behind the button would be something such as...

Dim stDocName As String
Dim stLinkCriteria As String

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

Tom
 
The command button is used on multiple switchboards and works perfectly for every other one, I did try to replace it anyway but I am not familiar enough with command buttons used on switchboards to create a new one that works properly. I also tried changing the option button that was associated with the action (changed slots) but had the same problem.
 
BrentJ
Well, if it works alright on all other switchboards, then it's not clear what is wrong.

Do the other options on the switchboard work alright?

Again, if you open the switchboard in Design view, then be sure that the tool box is checked to use wizards, drag a command button onto the switchboard and select the "open form" and then "open form and show all the records." The wizard should do the rest.

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top