Frames (or workaround?) (1 Viewer)

CAS

Registered User.
Local time
Today, 23:42
Joined
May 18, 2001
Messages
15
Does Access support either frames or a workaround in forms? Here's what I am trying to do, and maybe you could suggest ways to accomplish it.


On the left 1/3 of the screen, I want a "frame" that will display certain fields of the main database table. Next to each record will be 2-3 buttons, that, if pressed, will launch a specific form in a second "frame" on the right side (top) of the screen. In that second "frame," there would be another form listing records w/ buttons that would then launch the third "frame" on the lower right side of the screen.


I initially thought this could be most easily done via subforms that were launched when the main form button was activated, but I can't seem to figure out how to get a subform to always open in the same location on the screen (i.e., to simulate the positioning of frames). Of course, when the user selected a new record from the main table, any open "frames" would need to be closed.


Does this make sense? Anyone have any suggestions?


Thanks!
 

Fornatian

Dim Person
Local time
Today, 23:42
Joined
Sep 1, 2000
Messages
1,396
Maybe you've tried this already but...
Try placing all the subforms on the same form as your mainform to start with(overlapping each other) and set all the visible properties of the subform controls to false.

Then on the button click make the appropriate subform visible and the others invisible - same for the third 'frame'

May just work?

Ian
 

CAS

Registered User.
Local time
Today, 23:42
Joined
May 18, 2001
Messages
15
I thought that was going to work, until I just looked at the form again. As I have it designed now, the "main" form or frame (left side) consists of a one-line detail section that's set to continuous form view, which creates the scrolling list on the left side of the screen.

If I try to put the two subforms to its right (one upper and one lower), that means I have to increase the size of the detail section to one full screen, which puts way too much blank space between each of the records on the left of the screen.

Let me see if I can explain this a bit better. The screen would look like this:

("frame" 1) | ("frame" 2)
record 1 | record 1.1
record 2 | record 1.2
record 3 | record 1.3
record 4 | ------------------
record 5 | ("frame" 3)
record 6 | <data entry form>
record 7 |

By making the form large enough to include the second and third frames, I put too much empty space between records in frame 1.


[This message has been edited by CAS (edited 05-18-2001).]
 

Fornatian

Dim Person
Local time
Today, 23:42
Joined
Sep 1, 2000
Messages
1,396
Why not instead of inserting the field onto the form, use a listbox and set it's control source to the same as the form?

Then instead of referencing the form control simply reference the list box as:

Forms!MyForm!MyListBox

ensuring that you've set the bound column of the listbox correctly all should be fine, If you want to retain your form layour for the main form why not trick the user by setting form1 as a subform aswell and making it the same size as the remaining space when 'frames' 2 and 3 are positioned?

Again you'd have to change the query related to the 2nd frames, but I'm sure it will work.

Ian
 

CAS

Registered User.
Local time
Today, 23:42
Joined
May 18, 2001
Messages
15
Ian,

Thanks for your continued help with this. I am still getting used to Access and therefore may be missing something obvious, but my problem with using the list box is that I can't figure out a way to insert the three command buttons to the left of each record (which would then be in columns 1-3 of the list box). Even if there is a way to insert the icons into the first three columns, I'd need to find a way to identify which of the three command buttons was pushed and then open a particular form and pass along the primary key value from form 1's table.

(Does that make sense?)

Conversely, if I go the form route, I have figured out how to insert the command buttons as well as pass the needed value to the subform. My dilemma is that I can't figure out how to force a form or subform always to position itself in the same location on the screen when it's opened.

I think I now understand what you mean by making form 1 a subform as well, which will then allow me to force it to a certain portion of the screen. Will go try that...

Thanks again,

Chris

[This message has been edited by CAS (edited 05-18-2001).]
 

CAS

Registered User.
Local time
Today, 23:42
Joined
May 18, 2001
Messages
15
Success! (I think.) Time to test it out with the other subforms. Thanks again... I think you may have solved the problem.
 

Fornatian

Dim Person
Local time
Today, 23:42
Joined
Sep 1, 2000
Messages
1,396
Well done!
Just for information, if you'd have used the listbox route as I suggested you wouldn't have been able to put the three buttons at the end of each record. If I were doing it with a list box I would have had 3 buttons only which reference the listbox's value.

The reason you can't put buttons in a row in a listbox is because a button is an object in it's own right and a listbox is another object and the listbox cannot act as a container for other objects.

Hope that's sorted it.

Well done again.

Ian
 

Fornatian

Dim Person
Local time
Today, 23:42
Joined
Sep 1, 2000
Messages
1,396
If you are interested, have a look at this site:
http://www3.sympatico.ca/qaissuper/Index.html

It's got a database that I published called EventsAndWhen - shows when events are triggered. More importantly it indirecly shows how to use a listbox to set criteria for a form.

Ian
 

Fornatian

Dim Person
Local time
Today, 23:42
Joined
Sep 1, 2000
Messages
1,396
My apologies, it uses a combo box but essentially combo boxes are just list boxes that take up less screen space.
 

Users who are viewing this thread

Top Bottom