Topics Search

Fixed column widths in SubForm

Fixed column widths in SubForm
Views: 235
I've got a SubForm with 9 columns. Default View is Datasheet and all values for allowing other views are set to No. Can Grow and Can Shrink values for the sub-form and every object on it are set to No. Everything looks great, but when I open the Main Form in View mode, I can still go into the SubForm and adjust the column widths, which is exactly what I don't want to happen.

I'm obviously missing something somewhere, but I can't find any more sizing-related parameters to disallow. What else should I be looking at
Sponsored Links:

Similar posts...

 

Total Control Value in SubForm

Total Control Value in SubForm Icon
I have a two controls on a continuous subform the row source for both is a query and Column(2) is a Name, Column(3) is a number.

These are displayed by setting Column Count and Column widths to suit. The whole picture is - the Main Form will have a Calculated Value I want to enter a number of entries in the subform and depending on the value allocated to each Name (location) I will then allocate a portion of the Total Cost to each name.

It's taken me ages to get a cascading combos where the 1st is on the Main and the Second is on the subform now I cannot total this value on my subform so until I can do this I cannot get apercent to allocate each Location Cost (does this make sense)

I'd hoped this might work but I don't think Column count can be used in an expression
=Sum([DestinationNo].[Column](3))
Also the subform record source is not the table where the values are stored which I feel is part of the problem
 

Access subform design question

Access subform design question Icon
I am designing a project management database. In the main form, I want to display main information about the project that corresponds to that record (project #, start date, milestone dates, etc.).

I also would like to have a subform that lets users add dated notes or updates to the project record. It seemed like something I could do with a subform, but I've never usedthem before,

What I did was to create a separate table called Updates that has the following fields: ProjectNumber, UpdateDate, UpdateText. I then linked the ProjectNumber from the Updates table to the ProjectNumber in the main table.

I was able to successfully insert the subform displaying the data from the Updates table, but had a few problems. First, I can't quite figure out how to NOT show ProjectNumber in the subform.

Really all I want to show is Date and UpdateText. Is there a way to exclude ProjectNumber? I noticed that I could drag the border of that column to make its width zero, but that doesn't seem like the most elegant way to solve the problem.

In fact, I'd like the column widths to be fixed if possible. Is there a way to do that?

Finally, I would like the entries in the subform to be sorted by date. How do I implement that? I played around with some stuff, but couldn't get it to work.
 

Fixed values in a column?

Fixed values in a column? Icon
Is it possible for me to make a table and have a column with fixed values.

My plan is to have a table that records can be added to (with one column already assigned).

The records will be added via a query.

I don't know if this is possible, is it possible to have fixed a column that records can be deleted and inserted without the values changing in one column?

Almost like an autonumber, but that does not change if you delete and insert records? That would be perfect
 

Having problems with Combo Box (Form Control)

Having problems with Combo Box (Form Control) Icon
I have created several combo boxes which all have the same prefix in the name of the table: CB.

For instance, in the CB YNDK, there are two columns. The first is the ID, and the second is a column with the following: Yes, No, Don't Know.

Until recently, when I use the combo box (Form control) button, I am not able to choose the CB table I want to use but it creates a combo box which attached to the CB by checking the Table/Query data.

I then have to change the Column Count to 2 and change the Column Widths to 0. And sometimes this change doesn't happen and I have to keep playing with
the settings.

1) what's going on with the Combo box (Form control)? Why can't I select
which CB Table I want to use; and

2) What's going on with the column count and column widths settings?

I haven't made any changes (I.e. updates) to my Access 2007.
 

A Datasheet Conundrum

A Datasheet Conundrum Icon
I've been playing with datasheets for weeks now. It seems like I've learned a lot, but I've been having problems setting column widths in certain cases.

There are three fields that vary widely in widths and I've found I can use the On Current event to resize them on the run. I have two forms. On one it works like magic. On the second one I am stumped. I've been using the .columnwidth = -2 very successfully, but on Form 2 it ignores whatever value I put in.

Here is an example I used to test the code.

' Me.ID_1.ColumnWidth = 4000 ' MsgBox "Column width is " & Me.ID_1.ColumnWidth

The message I get back is
Column width is 1860
This gives me the same result.

' Me.ID_1.ColumnWidth = -2 ' MsgBox "Column width is " & Me.ID_1.ColumnWidth
 

Subform Layout: last visible column in the subform issue

Subform Layout: last visible column in the subform issue Icon
I have a subform that displays in datasheet view. I recently added a new value to be displayed in the subform. Naturally, the column went to become the last visible column in the subform.

What's weird is that now I cannot change the column position or width on any column in this subform. I've tried design view, datasheet view, layout view, and nothing works. I click save each time I change it before switching to another view. But when I reopen the form, they've gone back to the way they were before.

I can easily change column width and position on other subforms not related to this one.
 

Fixed Format In The Report's Detail

Fixed Format In The Report's Detail Icon
Is it possible to have a fixed format in a report? If Yes, Could You help me by giving the procedures on how to do this or may be code.The report should have 2 columns with the data entry like most of you have probably done by just formatting the column width and height of the report. Now, My report should produce a hard copy with the same format everyday. What if only the first column has the data for this day and the next data should be filled up the next time. I want to display the Textbox in the next column even if there in no data entered to it. Got It? Any Idea on how to do this; fixed format in a report
 

Subform Layout and columns width issue

Subform Layout and columns width issue Icon
I am using Access 2010 and amhaving an issue with a subform. I recently added a new value to the subform and now when I open the form containing the subform, the newly added value shows up at the end of the subform.

I have moved the column from the end to the position that I want it in in Design Mode, Layout View, Datasheet View, and saved each time before I switch views again, but no matter what I do, the column goes back to being the last visible column and the column width adjustments that I've made revert back to what they were as well
 

Record updates on a subform

Record updates on a subform Icon
I have a subform, lets say subform A, which displays the contents of a table in tabular form. I have another subform, lets say subform B,

One of the columns in subform A is computed with another column in subform A, and a column in subform B, and I'd like that column to be updated whenever the user changes the values pertinent to that calculation.

and the after_update events work. but the change doesn't appear on the subform.

I have to change the record twice each time, and then the data shown is always one change back. I've tried requery, refresh, repaint, etc on that form after the update is done, and I can'tseem to get it to display the updated value, despite the fact that I know the calculation occurred and saved the record in vba via .edit and .update.
 

Pass Values from one Subform ontrol to Another Bound Control on the Same Form

Pass Values from one Subform ontrol to Another Bound Control on the Same Form Icon
I am trying to pass the value for the second column of a combobox in a subform to another control (on the same subform) which has a control source from the underlying query. I have: me!testcontrol = me![subform].Form![control].Column(1) in the afterupdate event of a control.

It work as I would expect it to when I open the subform all by itself. The second control gets the value and it is passed to the query.

However, when I run the the form/subform I get an error saying that it can't find the subform.