Thanks. In my public sub I create a collection and add my new form instance to it.
Public Function Create015Datasheet() As Form
'Create a new form instance
Dim colForms As New Collection
Dim frmNew015Datasheet As Form
Set frmNew015Datasheet = New Form_frmCurrent015Datasheet...
I'm trying to create a new instance of an existing form, set it's record source, and display the form for the user. I can create the instance and display it, but as soon as the code stops executing the form instance goes out of scope and disappears. I've read that I need to... declare the...
I can do that. I believe I can reproduce the problem with a simplified database and stored procedure (the db is in SQL Server). The front-end is an adp.
While I'm working on an example, can you tell me if the following code should remove any record source from the form upon the close event...
I have a user input form that sets the recordset for a datasheet form and opens it based on the user selections. If the user views and or sorts the columns and then closes the datasheet, the code works just fine. However, if the user hides / unhides columns (right click column, then hide or...
I'm trying to use VBA to open a datasheet based on a SQL Server stored procedure. The stored procedure requires parameters. This seems simple enough, but I'm having trouble. My code is below. I'm having trouble setting the the datasheet's recordsource to the recordset.
Function...
The goal is to allow the user to hide or unhide columns of a subform in datasheet view. The datasheet is a subform and bound to a stored procedure. I'd like the main form to have two list boxes: one showing the user the list of currently visible columns, and the other listbox showing...
I've got a main form with two lists boxes. I want to show the visible columns in my subform (which is a datasheet) in one listbox and show the hidden columns in the other. Also I want to allow the user to hide / show columns using right or left arrow buttons between the list boxes. My subform...
I have a main report with a subreport in the detail section. If a control on the subreport has a value of zero I'd like to set the subreport to visible = false. The control on the subreport is an unbound calculated textbox. This sounds simple enough, but the solution has eluded me so far.
Hello from Maryland USA. Currently I work in Rockville. I've been building application and databases with Access on and off for the past 10 years. I generally know my way around the objects and VBA but I still like learning more whenever possible. I enjoying sailing on the Chesapeake Bay...