Forms :: Form Coding For Controls?

Aug 11, 2014

I have a form (see attached) and every time someone goes to a different field I would like to change the border to red and when they leave that field to change the border back to the default color. I know I can put the code in for each fields got focus and lost focus section but would rather be able to put the code in once and for it to work for all the fields.

View Replies


ADVERTISEMENT

Forms :: Coding User Login Form In ACCESS 2010

Apr 14, 2013

I have used Combo box. security_level field is the one that describes their levels and there are only two levels 1 and 2.. I have a table called User (user_ ID, User_Name, Password, Security_Level) On form there is a combo box for user name and text box for password. Two command button where one is for EXIT (Closing the application) and the second button is to run the code.

if the password in table User matches value chosen in combo box or user name and password are correct Then it should check if Security_Level of the user is equal to 1 to displays a form called Admin and when the Security_Level of the user is equal to 2 to display a form called user1.All that I want is to have a login that has two user and each user when login opens his/her own form which is different from the other user.

View 14 Replies View Related

Forms :: How To Ungroup Controls On Form

Apr 29, 2014

I had never seen this before as I have recently moved from 2003 to 2010. When I create a from using the wizard sometimes the controls are grouped (inside a dashed square) which does not allow me to modify its size and/or position independently.

How can I "ungroup" these control?

View 2 Replies View Related

Forms :: How To Hide All Form Controls At Once

Apr 21, 2013

how to hide all form controls at once like if i have many text box and labels how to make a loop to hide it all at once

View 1 Replies View Related

Forms :: Repeating Controls In A Form

Jan 7, 2014

I have a form that uses VBA codes to write all the info from the controls in the form into different relational tables. I was stopped at the point that I wanted to have repeating controls. Collect multiple instances of the same type of data, such as in the case of writing many people's Name, Age and Specialty in the Employees table. How do I do that? What is the VBA code for this task?

View 1 Replies View Related

Forms :: How To Format The Form Controls

Jun 27, 2015

Which option in property window is responsible for group lining up of some controls vertically? how to ungroup them to allow resize one individually. I could not also find option in menu for removing pre-formatting of those controls.

View 3 Replies View Related

Forms :: Same Form But Different Controls Per User

Sep 19, 2014

Is it possible to have a form and dependant on the security level of the user, will depend on what control will appear?
Or can I have the controls there and lock them to a user?

I have a DB of staff directory and I want to lock it so users can only view information, supervisors can edit and admin have full control.

I've done it so far by creating a different form and controls for each level but it a lot of work and queries. Is there a simpler way to do it?

View 6 Replies View Related

Forms :: New Controls On Form Are Not Responding

Jul 28, 2015

my form consited of 4 pages and controlled by query (joined 2 tables). I added a new table to the query and another page to the form . This page contains several controls (option, check boxes, combo boxes, text boxes) with source - fields of a new table added to the query. None of the controls on the new page respond.

View 5 Replies View Related

Forms :: One Form Controls Affects All Records?

Jun 25, 2013

I have a form where you enter a Case number (Primary key) and EmployeeID (foreign Key), the employeeID must match a employeeID held in the employee table. Within this Case form, I have a subform called Account which has an autonumber Primary key called accountID. Each of these accounts will have a questionnaire. So I created the questions in the same table (account). So Q1, Q2, Q3 etc. which are Questions relating to each AccountID, one accountID can have one questionnaire.

What is working fine is I can enter an account NUMBER which is a field in my account table (which creates a new AccountID(autonumber)) and can happily check the checkbox, fill out the text fields move to the next record and the checkbox is unticked and text boxes are blank (default state) which is great as I want them to ready for new input (new accountnumber/id).

My problem is assume I create my very first account number which would be say AccountID(0), I want all textboxes for the three questions disabled until the checkbox is ticked. So thats ok, I can put the default value of chkbox to FALSE, and in VBA I can do the on_checkbox_click, if chkbox.value = true then textbox1.enabled = true else textbox1.enabled = false. I can do that for the other two textboxes in the Chkbox click event.

When I Tick the checkbox it enables the textboxes, which is good, but when I create/move to the next record, instead of these textboxes being disabled as default, they are enabled because i ticked the chkbox for the first record. I dont want the manipulation of one AccountsIDs questionnaire to affects the other records. If I add an unbound textbox which I want to display a message if the chkbox is ticked, then if I tick it on one record, it has the displayed message on all records. How can this be if each questionnaire is independently i.e each questionnaire is for ONE accountID.

It seems the textboxes etc are not unique to each accountID but they should be because they are in the Account table and when I enter values and use the checkboxes without doing the disabling or showing a textbox comment, they are separate and work great, but when I use my code to manipulate the flow of a questionnaire for each account i.e enabling textbox/showing textbox comment, it changes the formatting on the other records questionnaire which I don't want as each questionnaire will be different, so a chkbox may enable a question on one ID but not on another as it wont be relevant, so at the moment I only have ONE truly working questionnaire which works for ONE account , but I want it to work uniquely for each account.

View 4 Replies View Related

Forms :: Highlight Mandatory Controls On A Form Tab

May 15, 2013

I am trying to provide a visual highlight for users of a multi tabbed form. I do a check as users go from tab and tab and i.e. on exit event and I would like to highlight all mandatory fields that have been left incomplete.

I did a test with one control and it worked as expected with the after update event of the specific control.

I then altered the code to add another control, but it does not work as expected. It only highlights one control and not the other. I just recently started using vba, I adapt the code to fit multiple controls and make it work as expected.

Private Sub Ctl2_frm_tab1_Exit(Cancel As Integer)
If (Len(Form_2.cmb_arName& "") = 0 Or IsNull(Form_2.cmb_arName)) Or _
(Len(Form_2.cmb_val & "") = 0 Or IsNull(Form_2.cmb_val)) Then
Cancel = True
MsgBox "Please complete the highlighted control", vbCritical + vbOKOnly

[Code] .....

View 3 Replies View Related

Forms :: Unbound Form With Tabbed Controls?

May 31, 2015

I have an unbound form with 2 tabbed Controls on it.On the first Tabbed Control my command button code works but not for the 2nd tabbed control. Although the command buttons themselves work as far as going to the appropriate record.

What I mean by this is that I use code to enable/disable the command buttons depending on what record you are on.

Example: If there is only 2 record, the other command buttons will be disabled, Do I have to refer to the Tab Control ?

View 1 Replies View Related

Forms :: Locking Form Controls After Input Added

Aug 15, 2013

What's the best way to lock down form controls after the user has entered data into them? I will have a button that reads "Save Record" that will make it so the records cannot be accidentally (or intentionally) changed after the button is clicked.

View 1 Replies View Related

Forms :: Calculated Controls Based On Weekday In Form

Sep 18, 2013

Here is the basic info:

Table has Checkbox column
BusinessDate column (mm/dd/yyyy format)
OrderTotal column (in dollars)
There are others but these are the relevant ones

In the header of the form I have a calculated control box with the following control:

=Sum(Abs(nz([Checkbox],0))*nz([OrderTotal],0)),0)

Which works just fine. The user is presented with a list of all the orders from this table in the form. They check the checkboxes and the control in the header shows the total of the records checked. I need to make 7 of these calculated controls, one for each day of the week. Is this possible? This way the user can see the order totals for each day of the week they have selected.

I tried:
=IIf(Weekday([BusinessDate])=2,Sum(Abs(nz([Pull],0))*nz([OrderTotal],0)),0)

but it still sums up the whole week as the expression holds true.I do not know VB, and I'm sure there is a really neat and easy way to do it in there. I just don't know how.

View 4 Replies View Related

Forms :: Expressions Not Working On 2010 Form Controls

Aug 13, 2013

I've just started using 2010 and, unlike previous versions, the expressions that I've put on controls in a form are not working. Is there a setting that has to change that's new to 2010?

View 5 Replies View Related

Forms :: Naming Form Controls Same As Field Names

Jun 13, 2013

Is it poor practice to name form controls with the same name as the field names?

View 5 Replies View Related

Forms :: Make Non-printable Section For Controls On Form?

Jul 8, 2014

I want controls on the left of my form, but when I do it this way and then print a record, it displays a big blank section.

How do I make the left side a non-print section for my controls?

View 6 Replies View Related

Forms :: Header Controls Invisible On Split Form

Oct 30, 2013

I've placed an unbound text control in the header of a Split Form. I also placed a label in header of a split form.But, neither is visible until I select a row on the split form datasheet.The Visible property is set to yes and the fore color is white and the background is transparent.

View 6 Replies View Related

Forms :: Textbox Controls Not Loading When Form Opens

Aug 9, 2015

I am having a hard time with this project that I'm working on at the moment.

I have created a modal dialogue form that has a macro set to open another form and close the current form at the same time. The form that is being opened has textbox controls that have the default value set to hold the data that is in the textbox controls in the modal dialogue form that is closing. The problem is, is that when the modal closes, the controls in the next form display #Name? and the data is not copied to the next form.

View 2 Replies View Related

Forms :: How To Make Navigation Controls On Main Form

Oct 18, 2013

how do you make the navigation controls on the main form control the subform i.e. navigating through the records or creating a new record???

View 2 Replies View Related

Forms :: Enabling Some Form Controls After Selecting From Combobox

Jan 27, 2014

I have combo box in a form. I want to enable (to highlight) some controls in the form after selecting any value from my combobox.

For example, There are three values in the combobox. And :

When I select value1, I want an unbound combobox1 to be enable (This combobox is synchronized with a bound combobox2). So when this unbound combo is enabled, its synchronized bound combo should also be enabled.

When I select value 2, it should do the similar action on a different unbound combobx3 (which is synchronized with a combobox4).

View 11 Replies View Related

Forms :: Hide Controls When A Form Is Opened Conditionally

Oct 7, 2014

I've searched and can only find information setting the visible property when selections are made on an open form--I want to set the visible property when the form is opened depending on which avenue the user chooses from the navigation form.

I have a navigation form (Form A) and a second form with a subform (Form B). The user will choose from a combobox, either an existing record or a new record on Form A. On Form A there are two buttons, one that will take the user to the correct record on Form B for editing and one that will open to a new record on Form B. Once Form B is open, all controls will be blank (if a new record is chosen) or with certain controls prepopulated if an existing record is chosen.

What I want to do is to hide controls on the main form (not the subform) of Form B if the user chooses an existing record. Form A's buttons work correctly to open Form B right now. I want to be able to hide prepopulated controls on Form B if the user chooses an existing record from Form A.

Here's the code I'm using to open Form B to an existing record. I'd like to set the visible property here if at all possible.

NOTE: "Form A" and "Form B" are not the actual names of my forms--it's just easier for illustration purposes here in my question.

Private Sub cmdAddLogEntry_Click()
DoCmd.OpenForm "Form B", acNormal, , "Activity_ID = " & Me.cboINum
DoCmd.Close acForm, "Form A", acSaveYes

End Sub

View 4 Replies View Related

Forms :: Hide Form Controls And Resulting White Space

Sep 20, 2013

I have a checkbox that determines whether or not to display certain form controls. How can I also hide the resulting white space that comes from hiding the form controls?

Can I put all of the controls in some sort of container and hide the container? The form objects are all displayed in order, so it shouldn't cause issue.

Can I create a subform for the objects and hide it? This would make the main and subforms based off of the same table.

Occam's Razor would be the preferred philosophy in this case. Nothing too fancy is needed.

View 4 Replies View Related

Forms :: Unhide Form Tab Controls Based On Drop Down Selection

Sep 15, 2013

I have tab control form with (5) tabs. For this discussion - Tabs 1 through 5. For a blank (new) form sheet tabs 4 & 5 need to be hidden. Based on what is selected via the drop down box (on tab 1) then tabs 4 & 5 may remain hidden or needed to be un-hidden. Example: [DropDown1]

Selection 1: stay hidden
Selection 2: unhide
Selection 3: unhide
Selection 4: stay hidden
Selection 5: unhide
Selection 6: stay hidden
Selection 7: unhide
Selection 8: stay hidden
Selection 9: stay hidden

I think one I figure this out then I can use the 'OnCurrent' event to check the drop down selection as a user selects the a record or scrolls through records.

View 2 Replies View Related

VBA Coding For Forms And Command Buttons?

May 31, 2012

I have an initial start up page where someone in any division can go and select their division from a combo box. What I want them then to be able to do is click one of the forms (New Entry,Edit Entry,.....).

For the form New entry I am looking to open the form with the division name to filled into a text box. I also would like to have that box that box also correspond to a field in a the table for a new entry.

View 1 Replies View Related

VB Coding In Form

Jan 30, 2006

I have a quick question. I have a main form with a label and a button on it. When the button is pressed a secondary form pops up. The second form has a button on it also. I am trying to code the button on the second from so that when it is pressed the label changes its value on the first form. In the past it was quite easy as there was no second form so in the Onclick VB coding of the button on the first form had something like:

With Me.mainHeading
.caption = "Recontacts"
End With

But, with the secondary form, the "Me." does not work. Is there a way i can replace the "Me." with some sort of link back to the first form?

View 3 Replies View Related

Forms :: Locking Main Form Controls Causes Data In Subform To Disappear?

Dec 12, 2014

So I am creating a Complaint Tracking Database with Access 2013. In my 'complaint entry form' I have added to ability to "Open" and "Close" the complaint. While the complaint is open the user is able to enter/edit data in the complaint (new or old). When the complaint is "Closed" (done so with a button on the form that prompts the user to enter a date of their choice) the user should not be able to enter/edit data in the given complaint. In my original thinking, I placed checks on various events (on load, after update, on click) that checked to see if the current complaint had a date in the "Close date" field.

If the close date field was null then that meant that the complaint was open and the the controls would NOT be locked. If the close date field was NOT null (i.e. a date was present) then the complaint was closed and the main form fields were locked but the data was still viewable and unless they "re-opened" the complaint they could not change the data.

Now, in the complaint entry form, I have a subform that acts as a action tracker that is used by the user to keep track of the actions taken on the complaint (i.e. they requested documentation from such and such on this date..etc). My problem through all of this is upon closing the complaint and locking the main form controls, my subforms data just vanishes! At first I figured the problem might be with the linking of master and child fields, so I made sure that I left the ID in the main form unlocked when I loop through my controls during the locking process. This did not solve my problem. Code below:

Private Sub Form_Load()
Dim ctl As Control
If Not IsNull(Me.close_date) Then
Me.FormHeader.Visible = True
Me.btnClosed.Enabled = False
Me.btnOpen.Enabled = True
For Each ctl In Me.Controls

[Code] .....

View 3 Replies View Related







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