View form properties with form open

mjdemaris

Working on it...
Local time
Yesterday, 20:45
Joined
Jul 9, 2015
Messages
426
Is it possible to somehow view/debug.print a form's properties while it is in the form view?

I have a form that I am trying to use for a couple of different scenarios, such as adding new parts OR editing existing parts' data. Currently I am using VBA to modify the form's properties to get the desired results, but there seem to be issues with changing some of the data. One error I get is :This recordset is not updateable. But I am thinking that the form is in edit mode, but cannot actually see which properties are changing when it loads.

I also change the control source and record source via VBA depending on what the user is going to do.

Mike
 
if your are using 2007 or later then open in layout view. Prior to that, not possible
 
may have misread your question. If you want the properties window open, I seem to recall you can do that in 2003 - you can also have the vba window open at the same time so you could say be editing the code of a button click event, click the button and observe the code
 
Well, I do have the VBE open to mod code on the fly. I am getting an error: This recordset is not updateable, when I try to change a record's data.
So, this explanation is going to get complicated.
Manager opens form, uses a textbox to search for a part which displays all parts with that criteria in the listbox. He clicks on the part in the listbox, (which sets a tempvar with a value), then clicks the Edit button. This opens the Edit form (the one in question) which should display all the data for this part:
ID - from Parts
Description - from Parts
Location - control source set to a joining table, PartLocations, row source is provided by another query because the bin location is a combination of warehouse # and shelf location.
Category - control source set to Categories
Min level, Max level - from Parts
CurrentAmount - a calculation from a query

The Form's record source is set to a query that provides the fields from the various tables.
All the sources are set using VBA, including whether to allow edits, etc. I've set the Form's properties on the property sheet to reflect a generic form.
I am trying to use this form for two purposes hence the VBA to change the sources.

Reading other threads, I am now wondering if using a query as a record source and having multiple tables involved like this might be causing the problem.

If so, I am not sure what the best way to go about editing/adding data from multiple tables would be.

Mike

The property sheet is not available in form view, which is when the form is loaded and I can see the effects of the VBA.
Ok, I now see that using layout view the properties are available. Hmm.
 
Last edited:
This is the query used as a record source for the form.

SELECT [T-Parts].MasterNum, [T-Parts].Item, [T-PartLocations].LocationID_FK, [T-Parts].CategoryID_FK, [T-Parts].WinterLevel, [T-Parts].SummerLevel
FROM ([T-Categories] INNER JOIN ([T-Parts] INNER JOIN [T-Transactions] ON [T-Parts].MasterNum = [T-Transactions].MasterNumID) ON [T-Categories].CategoryID = [T-Parts].CategoryID_FK) INNER JOIN ([T-Locations] INNER JOIN [T-PartLocations] ON [T-Locations].LocationID = [T-PartLocations].LocationID_FK) ON ([T-Locations].LocationID = [T-Transactions].Location) AND ([T-Parts].MasterNum = [T-PartLocations].PartID_FK)
WHERE ((([T-Parts].MasterNum)=[TempVars]![tmpMaster]));
 

Attachments

  • Q_PartEntry.PNG
    Q_PartEntry.PNG
    31.8 KB · Views: 74

Users who are viewing this thread

Back
Top Bottom