Change Text Box size

In Access 2007, after creating a form using the wizard, all of the text boxes created for entering data are the same size. When I try to adjust the width of one, they all change width.
How can I unlock or change this feature?

I have deleted a box, and then re-added it. This sometimes works -- however if you get the size close to the size of the other boxes, it “locks in” again.

I appreciate all sincere answers.
Ron


Post your answer or comment

comments powered by Disqus
I am working on a report that must be displayed in a certain way (I attached an image to show what I have so far). In essence it should look like a table and I have it almost to where I want it but I can not do 2 things:

1) In the description (left column), I need the line "Demonstrates Knowledge of basic number facts ( addition, subtraction, multiplication, division)" To appear as 2 lines as shown, but both lines need to be indented the same amount.

Originally, I tried a text box containing just the contents of fldDescription with a box object behind it, but I could not make the box change size depending if there was a single line of text or a double line of text.

Currently, I have abandoned the text box and box object combination mentioned above and went to a single text box with a border (txtDesc), but now I do not know how to keep the indent on both lines. Properties set for txtDesc are:
Can Grow=True
Border Width=1pt
Control Source=" " & fldDescription
How do I maintain the indent and also keep the outlined box sized correctly?

2) How do I enlarge the Tr-1, Tr-2, Tr-3 cells (text boxes with 1pt Border width) to match the height of txtDesc, while at the same time centering (vertically and horizontally) the text within each cell?

Any Help would be greatly appreciated - Thanks.

I have a text box that contains cc info and can vary in size from 200 to 2000 characters. When the text box is placed in the DETAILS section, it prints fine,
but when I put it in the REPORT FOOTER section, where it needs to be, it's limited to 255 characters.
Does anyone know how to get around this???

Is it possible to have the text size vary within a text box on a report?

I am trying to get

COMPANY - O/N - Del Date

to display as

COMPANY - O/N - Del Date

Is there any way to use conditional formatting to manipulate the size of text boxes as well as just their colour etc?

Thank you all for your help in the past. I have created a report that will change dynamically depending on how many columns of data i have (was setup via crosstab). The report will run from a form button.

Currently in the report's load event we have code as follows:


	Code:
	Private Sub Report_Load()
Dim SuppCNT As String

SuppCNT = Me.SupplierCount.Value

If SuppCNT = 2 Then
    Me.Box2.SetFocus
    Me.Box2.text = 2
End If

End Sub

supplier count is another text box based on a query output, in the report. We would like to change the control source property of Box2 = 2 if the count is 2, etc.

The report must show up in print preview form. Is there another event this information should be in possibly in the button's on click event to have this trigger correctly? Or possibly changing to a label and set the caption to the field?

The reason for repointing the textbox is that depending on how many suppliers we have (assigns fields names [1],[2],[3],[4],[5],[6],[7]...) the report will error as the field [7] will not exist, if the data ends at [2].

We have gotten a number of errors in testing this, from the field does not exist (explained method above), to the current that we cannot set the property for print preview...

Thanks in advance.

I have a Form with Text boxes that contain report names. I have a button on the form that executes the below code.... for some reason I can't get the text box background color to change before and after the code is executed. Can someone help me understand what I am doing wrong? Basically I want the text box background color to turn Red just before the DoCmd's are executed and turn Greeen when it is complete for each report.



	Code:
	 
Private Sub Command0_Click()
'Module Create By Brian Conner 5/2/2010
Dim User As String
Dim GrpNum As String
User = Environ$("USERNAME")
GrpNum = Txt_Grp.Value
 
 
'Recon_ATB_Sum_By_Payor
 
txtATBReview.BackColor = vbRed
 
DoCmd.TransferSpreadsheet acExport, , "Recon_ATB_Sum_By_Payor", "C:1 ATB Review" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_Rej_Summary", "C:1 ATB Review" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_Appeals_Summary", "C:1 ATB Review" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_Unresponded_Summary", "C:1 ATB Review" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_CPC_Non_Contracted_Summary", "C:1 ATB Review" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_Appeals", "C:1 ATB Review" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_Appeals_Summary", "C:1 ATB Review" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_FSC_616", "C:1 ATB Review" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_Summary_616", "C:1 ATB Review" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_Credentialing", "C:1 ATB Review" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_Credentialing_Summary", "C:1 ATB Review" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_Credit_Invoices", "C:1 ATB Review" & GrpNum & "ATBReview.xls", True
 
txtATBReview.BackColor = vbGreen
 
 
txtCredits.BackColor = vbRed
 
'Export Credit Report to Excel Workbook on Desktop
DoCmd.TransferSpreadsheet acExport, , "Credits_With_Payments_Adj", "C:CreditReport" & GrpNum & "Credit_Report.xls", True
 
txtCredits.BackColor = vbGreen
 
 
 
txtCleanClaim.BackColor = vbRed
 
'Export Clean_Claims_Against_Open_AR_Without_Pymt_Adj to Excel Workbook on Desktop
DoCmd.TransferSpreadsheet acExport, , "ATB_With_Clean_Claims", "C:ATB_With_CleanClaims" & GrpNum &
"Clean_Claims_With_Open_AR.xls", True
 
txtCleanClaim.BackColor = vbGreen
 
 
end sub



This might be something for the Forms discussion board. But it also involves VBA coding.

I have 3 bound text boxes which I have placed in the footer section of a form. The footer section is invisible to the form user.

The user enters data into 3 unbound text boxes which are visible and then clicks on a SAVE command button to save the record.

The VBA code for the command button transfers the entries from the unbound text boxes into the invisible text boxes and saves the record.

My problem is that the VBA code keeps changing the name of one of the bound text boxes after I enter the code.

I usually put the prefix "txt" in front of Text Box names. In this case, I used the following names:

txtepisodeID
txtfunctionID
txtnameID

When I key in the VBA coding and hit enter, ACCESS capitalizes the first "E" in the text name as follows: txtEpisodeID

So I decided to rename all the Text Box names to:

txtEpisodeID
txtFunctionID
txtNameID

for the sake of consistency.

Oddy enough, the VBA coding does not allow the "F" and the "N" to be capitalized.

The coding seems to work fine, but this capitalization in some cases, but not other cases is very odd.

Does anyone have any idea why this is happening?

I have a lookup combo box which fills in text box1 and text box2, I have then set text box1 for if it recieves a specific value, it will fill in another text box(text box3). This all works, but occasionally, text box3 will require a different value, if I type in another value, going from one record to another, changes it back again.

Hi,

I have a continuous subfrom on my main page, that keep Log entries.

Is there anyway I can resize the text box, for each instance in the continuous form, dependant on the size of the text in the record ?

At the moment you either have it to big or too small, so I did set it to smaller size and had a zoom box set up on a CLick event, however if I can get the text box to resize for each individual record, in the continuous form, this would look much neater.

Many thanks

MattP

Hi all,

I'm a newbie with Access (although I do have some experience programming other MS products (like VB)) so I'm not sure I'm even asking this the right way, but here goes:

I have a database with 3 tables:

tblRequirements contains requirements and has the following fields:

Number (Text)(PK) - Requirement number (e.g. 10.2.3)
Title (Text) - Requirement title
Description (Memo) - A detailed description of the requirement

tblSolutions contains descriptions of various solutions:

Key (AutoNumber)(PK)- An auto-generated primary key
Vendor (Text) - Name of vendor that supplies the solution
Name (Text) - Name of product/solution
Description (Memo) - Details of the solution

The third table, tblReqtsSolsMap, is a junction table that maps requirements and solutions. Since a given requirement can be adressed by more than one solution, and a given solution can address more than one requirement, it's a many-to-many mapping. Here are the fields:

Key (AutoNumber)(PK)- An auto-generated primary key
RequirementKey (Text) - The key of the requirement being mapped (from tblRequirements)
SolutionKey (Number) - The key of the solution being mapped (from tblSolutions)

I've managed to create individual forms for entering the requirements and solutions info, and I've started on a form that allows the user to map solutions to requirements, but I'm stuck on one piece of functionality I'm trying to add. Right now the 'mapping' form (a data entry form) has two side-by-side list boxes. The one of the left lists the number and title of the requirement, and the one on the right lists the company and name of the solution. If a user selects a requirement in the left listbox and a solution in the right listbox and clicks on the 'Add Map' button, everything works fine - a new (correct) mapping record is created in the tblReqtsSolsMap table.

What I'd like to add is a text box(?) underneath the left listbox (Requirements) that shows the 'Description' memo field for whatever requirement the user selects in the 'Requirements' listbox to provide them with more details so they can map the correct solution. Since the 'Description' field in tblRequirements is a memo field and usually fairly long I can't effectively include it in the requirements list box.

What would be the most effective way to display detailed information for whatever item is currently selected in the listbox? I've looked through the Access help and several books, and a sub-form might work, but I have no clue how to trigger an update when the selection in the Requirements listbox changes, then pass the associated Requirements Number to the sub-form so it can retrieve and display the appropriate Description.

If someone can just describe the basic steps involved that would be great - I'm not even sure I'm searching on the right words when I'm researching this.

Thanx.

John

Hi All,
I am making a new db that I want to change the forms title either in a label or text box when I use the same form for different set of records with different filters. Help needed.

G-day
New to access and recently developed a successful database for work analysing KPI results etc. Now just for a learning experience re: analysing LOTTO results, I want to develop a form to changes the back colour of a text box when the number in it is the same as one entered in another text box (so I have a static unchanging 18 rows of 6 numbers in each in a table and one row of six numbers that change each week depending on the LOTTO draw and are entered in via text boxes on the form]. I can do this with;

Dim Num1 As Long
Num1 = Me.No1 (No1 = first weekly drawn number)
If Me.n1 = Num1 Then (n1 = column one of the 18 rows)
n1.BackColor = vbGreen
End If

My lotto card is 18 lines long and I have used a continuous form to have all the 18 lines load into the form from a table. So when I put the first drawn number into Me.No1 text box and if it matches the first number in the first row of Me.n1 text box the whole 18 rows change colour instead of only the ones that match Me.No1. Any help would be welcome.

Hello. I have a problem that you all may be able to help me with. I have an access form and on that form are 2 fields, one is called "Status" and the other "Date Last Reviewed".

What I would like to do is have the Status field set as a text box that will automatically change from "Current" to "Review" when the date in the Date Last Reviewed field reaches a specific date.

For example, when a user inputs that they reviewed the document today, then the Status field changes to "Current". When that date reaches 30 days or older than the current date, the Status field automatically changes to "Review".

Could someone steer me in the right direction to accomplish this? I'm sure there will need to be some kind of code or expression to make this happen, but I'm at a loss.

Thanks in advance!

The following doesn't work. How do I do some sort of query to check for something and, if it's there, do something with related information? I have the SQL queries all on one line but I'm going to break them apart for greater visibility:

	Code:
	Private Sub Form_Load()
IF
   (SELECT COUNT(1)
   FROM [App Info] INNER JOIN [Class Info] ON [App Info].[Soc Sec #]=[Class Info].[Soc Sec]
   WHERE [Class Info].[Class Name] alike "Qual%")
   > 0 THEN
   [Qual Class Text Box].Text =
   (SELECT [Class Info].[Class Date]
   FROM [App Info] INNER JOIN [Class Info] ON [App Info].[Soc Sec #]=[Class Info].[Soc Sec]
   WHERE [Class Info].[Class Name] alike "Qual%")
End Sub



I dont know what its called so I didnt know what to search for.

Basically, I have resized a text box. I dont want the user to type beyond that length.

What do I turn on or off to prevent this?

I have a form with a text box whose recordsource is a memo-type field. I have a buch of stuff on the form that precludes a significant part of the form being "taken over" by this field. I have sized the field to accommodate probably 90% of the records, but a few of them overflow the field.

A user opening the form on one of these "long" fields will see the text truncated unless s/he moves the focus to the field, e.g., by clicking on it, at which time a vertical scroll bar will appear.

I hate to automatically send the focus to this control every time the form is opened, but I'd like to be able to clue the user that there's more text available if s/he wants to see it.

Does anyone know of a way to determine programmatically if text overflows its allocated text box size? With this, I could make visible a little "more..." indicator near the bottom of the box.

TIA,
Jim

Greetings all--

I seem to recall in earlier versions of Access that when there was more text than the size of the text box allowed, a scroll or something would appear to the right of the control to all scrolling. I don't see this presently (Access 2007). Was I imagining a scrolling capacity earlier?

I have a continuous subform with a the need to minimize the text box size, but it would be nice to have scrolling (especially since "Can Grow" doesn't function).

Any thoughts?

Thanks.

Paul

What i want to do is change the font size of a text box that is in a sub report UNTIL the report is 1 page. Here is the code i have for finding the page number

Dim intTotalPages As Integer
Dim strMsg As String
intTotalPages = Me.[Pages]
strMsg = "This report contains " & intTotalPages & " pages."
If intTotalPages > 1 Then

MsgBox strMsg
'Change Font Size Here...

End If

Is there a way to have a Label or Text Box auto-size its width to its dynamically-changing contents with VB (like when you double-click it during design mode)?

A quick question that I'm sure one of you guys will be able to answer without any trouble, but I'm having difficulty with...

I have a form on which I would like to have a text box which returns the size of a file on my PC. The file path will not change.

Any ideas would be appreciated.

Thanks in advance.

I have a report that uses a crosstab query and I have been forced to bring all the data through in one string for it to sort and display as wanted.

Is there any way I can format the font size at either the query stage or in the report so that the 1st line is smaller that the second & third.

I have used this to create the string and add returns in:

Vs: Sports.Sport & Chr(13) & Chr(10) & " " & Last(Teams.Name & Chr(13) & Chr(10) & " Vs. " & teams_1.name)

This returns something like in a single text box:
Soccer
Team A
VS. Team B

I would like to reduce the size of the Sport name.

Suggestions?

Greeting all
i have a report showing an invoice,

on the last line of the invoice i have the total, its showing "balance Due" and the amount $ beside it.

Now what i want to do is, if the balance comes up with a (-) value, i want to change the "balance Due" message to " Balance"

so basically , if the total comes with minus (-) then i would get a message, and if the total is plus (+) then it would show a different Message,

is that even possible to change the text box ?

thanx for any thoughts

Hi

For a diagram I am trying to create I need to have 2 text boxes, both with background colours set, one on top of the other. I am having a lot of trouble getting the smaller one to appear on top of the larger one. (other way round defeats the object!). The size and position of the boxes are set in cade, as they change with the data.

Is there a parameter I can set to say which one should be on top, like the order command on the drawing toolbar ion word.

Thanks

Sue

Any idea if it is possible to change the font size of a report text box according to it contents - in this case text which is either A or C?

Conditional formatting does not appear to do more than change the style of font - I cannot see a text size option.

Events do not appear to include 'OnOpen' etc.


Not finding an answer? Try a Google search.