Modules & VBA :: Disabling Auto-formatting Of Controls In A Form?

Jul 14, 2014

I have a problem with formating controls in a form. As a example, I inserted a tree view control and adobe reader control. After I've resized them manually in a design form, I switch into form view and they both resize automatically to their own size (don't know where it gets from).

In the result, I can't obtain the required width and height. How can I make them resizable to my own preference?

View Replies


ADVERTISEMENT

Disabling ALL Controls On A Form Via A Combo Box

Aug 10, 2005

My database has a form with a combo box where the user can select whether the record displayed is "Current", "Sold", or "Withdrawn". I would like to set up the form so that when the user selects "Sold" or "Withdrawn" from the combo box, all other controls on the form are locked and disabled (ie. can't be changed).

What's the best way to do this?

View 4 Replies View Related

Disabling Buttons From Tab Controls

Mar 29, 2005

Hi there everyone,

I got the following Switchboard example somewhere else, and I do understand the code, up to the point where I want to make a change but can't :mad:

The Navi buttons on the right can be chosen by the user to display the different tabbed pages. However, I want sometimes that some of these buttons are disabled at runtime.

I cannot get the right syntax for doing this. I've tried Me.btnPage1.Enabled = False but that just does NOTHING!

Could someone please have a look at the attached DB (frmSwitchboard and the code behind it) and tell me where I am missing something? That would be great, thanks!

Regards,
J

View 3 Replies View Related

Auto Generated / Flexible Controls In A Form

Sep 20, 2006

Can controls in a form be made flexibly or auto-generated based on parameters set in another form?

Supposed I have a continuous form with 10 textboxes, while at some other time I need to have 12 textboxes or 5 textboxes only. Total textboxes needed would be set from another form. The maximum number of textboxes should be unlimited. Is it possible?

The backend table actually can be created flexibly using SQL based commands. And to link the fields to the textboxes is another problem.

Any clue?

View 4 Replies View Related

Modules & VBA :: Enabling And Disabling One Control On Continuous Form

Mar 4, 2014

Basically I have a continuous form with each record having a textbox and a checkbox. There can only be one checkbox ticked per record but what I want to do is to stop the other checkboxes from being ticked if one is already ticked.

View 2 Replies View Related

Formatting Report Controls

Feb 8, 2005

I have 2 questions with regards to report controls



1) is there anyway to stop calculated controls from rounding numbers off. We want 7.6 to show as 7 not 8

2) can you make negative numbers appear as zero instead of the number.



Any suggestions would be greatly appreciated.

View 3 Replies View Related

Forms :: Conditional Formatting Of Controls In A Continuous Subform (Access2007)

Aug 28, 2013

I have a continuous subform with multiple controls (textboxes) per row.

I'm trying to set up conditional formatting such that certain textboxes are highlighted based on comparisons with other textboxes within the same row/record.

What's bothering me is, I have managed it for one, but struggling to do it for others!

For example - I want to highlight 'similar' records (i.e. possible duplications) - and have managed this by adding a textbox across the length of the row and applying the following CF expression :

Quote:

DCount("[ID]","[tblMyTable]","[ID] <> " & "txtID" & " And [Field1]=" & "txtField1" & " And [Field2]=" & "txtField2" & " And [Field3]=" & "txtField3" & " And [Field4]=" & "txtField4" & " And [Field5]=" & "txtField5")>0

Works brilliantly - highlights all records where fields 1 thru 5 hold common values.

Now I want to highlight where two fields within the same record are different (i.e. they are driven by different data but should hold the same value)

Am trying this :

Quote:

"txtField3"<>"txtField4"

But it's not working - it's highlighting pairs of fields even though they do hold the same value.

Even tried switching it for a DLookup (which seems like doubling up on effort, but just to see if it worked)

Quote:

DLookUp("[Field3]","[tblMyTable]","[ID]=" & "txtID")<>DLookUp("[Field4]","[tblMyTable]","[ID]=" & "txtID")

But no dice? I can't figure out why the same basic logic which works so well for the first CF, doesn't hold for the second one.

View 5 Replies View Related

Modules & VBA :: Adding Controls To Form And Saving Modified Form

Dec 3, 2013

I am trying to open a form in design mode and add controls, this i have done. I am doing this all in a class, and am having trouble saving the modified form.

I have tried using the following, both produce errors

Code:

DoCmd.Save acForm, "tmpQueryDes"
DoCmd.Close acForm, "tmpQueryDes", acSaveYes

View 3 Replies View Related

Modules & VBA :: Check That Certain Controls On A Form Have Values

Sep 15, 2014

I have a bit of code that uses controls on a form to batch add records to the tables. Before the code executes, it needs to do a check to make sure that all of the needed data has been supplied.

Code:

If IsNull(txtDateAdded) Then
MsgBox "Please supply the date that the Label record was created"
Exit Sub
Else
If IsNull(cboRecordCreator) Then

[Code] ....

View 1 Replies View Related

Modules & VBA :: Module To Modify Report Controls Based On Form?

Feb 12, 2015

I am trying to create a customizable report that would allow the users to choose fields. I have a pretty common code that I found online and adapted it, but it fails on the first SetReportControl function.

The error reads: Run-time error 2465: Application-defined or object-defined error

Could it be something as simple as an incorrect reference? I have checked multiple times, but I am stumped.

Code:
Option Compare Database
Option Explicit
Sub MakeReport()

[Code].....

This is a trial run, in the end I need to be able to open a report, then adjust the Report controls within 1 or more subreports inside the main report. That is a battle for another day.

View 14 Replies View Related

Modules & VBA :: Main Form On Open Event To Show Tabbed Controls Only If There Is Data

Jul 24, 2013

I have a report that tracks scores for our employees. From the report, you can click a button to add a new score in a form or edit an existing score(frmscoretracker). On this form there are two subforms, in a tabbed control to track additional information about the score; what areas were marked down(Trends), and was it a failing score(AutoFail).

When this form opens I have it programmed to only show the subform if there is data in it. The goal being, if I am adding a new score and there is no existing trends or Autofails for this new record, neither subforms will show - I will add an after update even to show either trends or autofail depending on the score recorded. Also, if someone chooses to edit the score, whatever subform with data, will show as well.

When someone clicks to add a new score, opening this main form to a new record, both of the tabs show. However, if the form opens to an existing record, the appropriate tab shows. Here is the code

Code:

Private Sub Form_Open(Cancel As Integer)
'If the subform has a record, the tab is visible, if not, the tab is not visible
If Me.frmtrends.Form.Recordset.RecordCount > 0 Or IsNull(Me.Trends) Then
Me.Trends.Visible = True
Me.TabCtl33.Visible = True
Else
Me.Trends.Visible = False
End If

[code]...

Both tabs are set as not visible in the default settings. Is there something in this code that is triggering then to be visible when there is no record in the main form?

View 4 Replies View Related

Modules & VBA :: Conditional Form Formatting Depending On Field

Jul 2, 2013

I created a form that applies conditional formats depending on a field. It works fine, until you enter data into one of the conditionally formatted fields, then all hell breaks loose. Conditional formats totally go away and the cells go to #error.

View 3 Replies View Related

Modules & VBA :: Conditional Formatting With Like - Colouring Fields Within A Form

Jul 5, 2014

What I am trying to do is create conditional formatting to colour fields within a form.

The conditional formatting option built in allows me to colour based on set values i.e. Value=Design turns green. I need to somehow say if Value contains the word Design turn green. This is because in addition to the word Design there will be a variable description. I tried editing the conditional format created by the wizard to Value="*Design*" but that didn't work.

Now I'm trying to write it in VBA code but am still struggling. Here's what I tried but it doesn't like it:

If InStr([Forms]![Query2]![Activity] Like "*Design")>0 Then
[Forms]![Query2]![Activity].BackColor = vbGreen
End If

View 14 Replies View Related

New To Access, Auto Formatting Tables

Jun 17, 2005

Hey guys, very new to access.

I've been put in charge of setting up a database for work which stores statement and invoice information.

I'm just wondering how I can auto format a field.
I'm guessing it's in the "Validation" section.

A statement is a collective of invoices for each month.
So each March '05 Statement will contain all March '05 Invoices



Basically, what I would like it to be able to do (:)) is for the date inputed into the database, it creates it's own "statementnumber".

Eg. March '05 will create a number as 305 for example. 3 being the month, 05 being the year.
Because I need a common number to setup a relationship of One-to-Many.
Just wondering if this was possible.

Thanks guys :)
Greg

View 7 Replies View Related

Modules & VBA :: Change Formatting Of Unbound Text Field On Continuous Form

Apr 16, 2015

I have a continuous form with a text field that says "Select". There are two other fields, one of which is Brand. When the Brand Combo box has nothing in it I want the text box to appear (instructing the user to select a Brand) But once the user selects a Brand and goes to the next records, I would like the "Select" in only that record to become not visible. I tried conditional formatting but can't apply that to an unbound control ( or at least it is grayed out when I select the text box) and any other possible solutions I have found changes all of the selects - not only the one in the changed record.

View 7 Replies View Related

Modules & VBA :: Disabling Option Group If A Button Is Pressed

Jun 16, 2014

I have an option group with 2 buttons in it, yes and no. It is set to default to No, but if someone hits Yes I want it to enable or turn on the next option group. Would just simply changing visible status disable it? Because I have a series of codes set up based on the second option group which read as:

Code:
Private Sub NumberOfAdditionalSites_Option1_GotFocus()
Me.AdditionalSitesLabel1.Visible = True
Me.AdditionalSitesText1.Visible = True
End Sub

[Code] .....

I do not want these to be visible if the initial option group is still set to no.

View 4 Replies View Related

Modules & VBA :: Auto Click Textbox On Form?

Jul 10, 2015

I have a form which contains a textbox called Expire_Date.

When the form is running, the contents of the [Expire_Date] txt box triggers

Some vba to populate another textbox [Flag] with "Valid" or "Expired" based on the date in [Expire_Date].

Textbox [Flag] is conditionally formatted but will only change if you click on the [Expire_Date] field.

Is there a way to use vba to click this field for each entry as there are multiple?

View 1 Replies View Related

Disabling A 2 Fields On A Form

Jul 26, 2005

I would like to be able to disable 2 other fields on a form if a user selects a certain item from a drop down list on that same form....????

ANY HELP

View 3 Replies View Related

Temporary Disabling A Field In A Form

Sep 24, 2006

Hopefully someone can point me in the right direction.

I have a small spare parts db which also has pictures of some of the parts.
manufacturer
partnumber
wholesale
retail
picture

The form carries data on wholesale price which I would need to hide if the customer would like to see a picture of the required spare part.
Is it possible to have a button to temporary make the wholesale field non-visible? Or would it be better to click on a button to open a new page with just the picture of the selected part and the retail price, if so what is the best way to achieve this.

Thank you in advance for any assistance.
Kim

View 1 Replies View Related

Disabling The Close Button On A Form

Dec 21, 2006

I have a form which I want to disable the close button. On the properties of the form I set Close Button option to 'NO'. When I open the form the form close button is disable, but as soon as I maximse this screen, the close button becomes enabled again. Any Ideas as to why this is happening and how I can disable this button comlpetely on this form?

View 2 Replies View Related

Forms :: Disabling Additions In A Form

Mar 22, 2013

I have a form which acts as a search function for users looking to amend existing records. This is based on a query, where users enter a parameter (PolicyNumber) and this returns only the records which match the PolicyNumber in a form view. I have also added basic navigation buttons to move between all records with the same policy number. I have a problem in that I can't disable the option to add a new record in this form once people navigate to the end of the records.

The user clicks a 'search' button, manually inputs the policy number, and the records are returned in form view. The code for the button is as follows:

Code : DoCmd.OpenForm "frmAdjustmentsEdit", acNormal, "qryPolicyNumberSearchWriteOff", "", acEdit, acNormal

How I can disable the addition of records in this? Also as a sidenote if no records are found I would like it to display a MsgBox, but despite trawling the internet have been unable to find a solution I could get to work.

View 7 Replies View Related

Forms :: Disabling Fields From A Different Form / Table

Feb 14, 2014

I am trying to disable a field in a form based on a value in a field on a different table/form. I have been able, through simple VBA code, to disable fields based on a value in the same form. Are queries/sub forms the only way to go?

View 7 Replies View Related

Modules & VBA :: MessageText Argument To Be Auto-filled With Whatever Value Combo Box In Form Holds

Jun 28, 2013

I want the MessageText argument to be autofilled with whatever value the combobox in the form holds. This is my code so far...

Code:
Private Sub Command54_Click()
Dim EmailText As String
EmailText = "Submitted By: " & vbNewLine & vbNewLine & "Description: " & vbNewLine & vbNewLine & "Subject: "
If Combo18.Value = 1 Then
DoCmd.SendObject acSendNoObject, , , "knagel@durablepackaging.com", , , , EmailText, True

For instance, after "Submitted By: " I want the value from the combobox: Submitted By in the form to be automatically placed there.

View 2 Replies View Related

Forms :: Disabling Subform Depending On Main Form Value

Jan 9, 2014

I have a mainform called frm_Main containing the field AgeCalc

I then have a a subform which has some tabs, one of those tabs contains a subform called frm_Bans.

If the AgeCalc field is <17 I want to disable the subform frm_Bans.

View 4 Replies View Related

Forms :: Graying Out / Disabling Field Based On Other Fields On Form / Subform

Jun 27, 2013

I am wanting to grey out/disable a field on a form based on entries in two other fields being the same. One of these fields that contains the data to be referenced in on a sub-form.The form is called 'Payment_Information-Form', the field to be greyed out/disabled is called 'SUF A Paid?'

The fields that are being referenced are: 'Set up fee in s (SUF) Recrt Restriction A <=' which is on the main form, and 'SUF_Letter' which is on a sub-form (within the main form). The sub-form is called 'Costings_11_Previously_Paid_SUF subform'.If 'Set up fee in s (SUF) Recrt Restriction A <=' equals 'SUF_Letter' then grey out.I tried the following formula in both the On Current and After Update sections but it hasn't work.

=IIf([Forms]![Payment_Information-Form]![Costings_11_Previously_Paid_SUF subform].[Form]![SUF_Letter]=[Set up fee in s (SUF) Recrt Restriction A <=],[SUF A Paid?].[Visible]=True,[SUF A Paid?].[Visible]=False)

View 4 Replies View Related

Modules & VBA :: Name Auto-Correct Off But Auto Changes Appear

May 22, 2014

Access 2010 keeps changing the Capitalization of objects when I don't want it to.

For example "Cancel" becomes "cancel". Later it will be changed back to "Cancel".

There is also a table with a field "FULLNAME". Several Queries build a field "FullName". As a result FullName, even in places like Application. CodeProject.FullName get changed to Application.CodeProject.FULLNAME.

(Track Name AutoCorrect is off. ) It is especially irritating because I export the code to text files and check it into source control. Sometimes dozens, or even hundreds, of files will show up as changed because Access did it's rename thing.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved