Open Form With All Fields Enabled And Unlocked

Feb 9, 2007

I presently have a form that I have all the fields set as read only by using the enabled and the locked property of each field. However I have to be able to open the form to certain users with all fields enabled and unlocked. I need code that will run through each field and set the field's enabled to True and the locked to false. This code I will apply to a button that will open the form.

Cheers

View Replies


ADVERTISEMENT

Designing Form But Table/query With Fields Not Enabled

Jun 29, 2005

im creating a form in design view but the icon to show the fields from the table that i want the fields to come from isnt being displayed; how do i get it to show?

View 2 Replies View Related

Locked/unlocked

Jun 13, 2005

I have 4 yes/no check boxes on a form. There are 4 other text fields with each one of these main yes/no check boxes. One of these yes/no checkboxes will be checked on each form created.

-------------------------------------------------------------------------------------------
StaPrimary FirstName LastName VerifyDate ReVerifyDate

StaUp FirstName LastName VerifyDate ReVerifyDate

StaBack FirstName LastName VerifyDate ReVerifyDate

StaOther FirstName LastName VerifyDate ReVerifyDate
-------------------------------------------------------------------------------------------

For each new form created I want all 4 checkboxes and its corresponding 4 fields unlocked/enabled.

When any one of the 4 main checkboxes is true, I want the other three and and the 4 text fields that go with them locked and/or disabled.

When I page back and forth between forms I want each form to have the appropriate fields locked/unlocked and or disabled/enabled depending on which main yes/no check box is checked.

I had presented this issue in the past and was never able to solve the issue.

Thanks for any help.

View 1 Replies View Related

Subform Or Combo? - Locked & Unlocked

Jun 29, 2005

I have a combobox that:

1. When adding a new record, I want the user to be able to select any value from the combo box. I then have 3 other fields that automatically fill themselves in. I set their sources to [combobox].Column(x), 'x' being their resepective column in the combobox.

2. When the user is simply looking at a record and not adding a new one, I want the combobox (and, therefore, all 4 fields) to be locked to prevent accidental changing, etc.

First of all, I know that comboboxes should be avoided, if possible - I would like to use a subform (I think) if I can, but I don't know how to do it. What steps would I need to take to implement a subform for this process.

Secondly, whether I use a combobox or a subform, is it possible to have records locked when the user is only "viewing" them and unlocked when they need to add a record? Otherwise, whatever the default values are for those 4 fields will remain for that record since the user cannot change them. Hopefully, this makes sense. Any improvements to my idea would be appreciated.

I have installed a checkbox next to the combobox. After the user selects an option from the combobox, they can check the checkbox to "lock record." I know its a bit primitive, so to speak, but I think it will serve its purpose. If they ever need to change the record, they can uncheck the checkbox and proceed if necessary.

This will work, but it is not ideal obviously. Once the user enters that data, it most likely will never change. Something more permanent would be more desirable.

View 4 Replies View Related

Open Form Command Button Fills In Text And Date Fields From Previous Form

Apr 27, 2005

I currently have two forms: frmE_SAFind and frmE_SAOrder

frmE_SAFind shows results from a query including fields [txtIDPO] and [dtmDate]
Example:
IDPO Date
btnOpnFrm 6543 2/1/05
btnOpnFrm 5681 1/1/05

frmE_SAOrder shows order details including [txtIDPO] and [dtmDate]

I have a open form command button set up on [frmE_SAFind] that opens [frmE_SAOrder]. Is it possible for me to modify its properties so that when the open form command button is clicked, the order details in [frmE_SAOrder] will represent the order that the user is selecting via the btnOpnFrm command?

Example: If I click btnOpnFrm for 6543, [frmE_SAOrder] will show me PO 6543 details.

Hopefully I made myself clear enough to understand. Thanks for your help!

View 1 Replies View Related

Populate Form Fields On Open

Aug 7, 2006

Hi all,

I'm sure this must be a well used function by many access users but I can't find anything about it online at all - please help!

I want to open a subform "AddReservation" and populate three fields with data taken from the relevant record in the main form. So in the btnOpenAddReservation_Click event to open the subform I set global variables, then in the form_open event I have this:

Private Sub Form_Open(Cancel As Integer)

Me.CatID = stLinkCatID
Me.CatName = stLinkCatName
Me.OwnerID = stLinkOwnerID

End Sub

But I get the error 2448 'Can't assign a value to this object'.

However if I put the same three lines into the start of the subform's btnARSave_Click event it works fine:

Private Sub btnARSave_Click()
On Error GoTo Err_btnARSave_Click

Dim stDocName As String
Dim stDocName2 As String
stDocName = "OwnersAndCats"
stDocName2 = "AddReservation"

Me.CatID = stLinkCatID
Me.CatName = stLinkCatName
Me.OwnerID = stLinkOwnerID

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

YesNo = MsgBox("This reservation has been added successfully, do you want to add another?", vbYesNo + vbQuestion, "Add More Reservations?")
Select Case YesNo
Case vbYes
DoCmd.GoToRecord , , acNext
Case vbNo
DoCmd.Close acForm, stDocName2
DoCmd.Close acForm, stDocName
DoCmd.OpenForm stDocName
DoCmd.GoToRecord , , acGoTo, stRecordNo
End Select

Exit_btnARSave_Click:
Exit Sub

Err_btnARSave_Click:
MsgBox Err.Description
Resume Exit_btnARSave_Click

End Sub

What am I doing wrong? Why can't I populate the fields on open?

Many thanks
PT

View 1 Replies View Related

How To Open Form With Blank Fields Rather Thn First Record!

Jul 10, 2006

I have a form linked to an employees table. I have a search function on this form which allows you to search for a particular employee.
At the moment when i open my form, it always displays the first record!
How can I make my form open with blank fields instead of the first record showing?

Thanks alot.

Regards,
Amber

View 14 Replies View Related

Forms :: Updating Fields On Another Open Form

Jul 2, 2014

I have an open form "MattersFileFrm" that has total fields on it.

I have a transaction form open where the user is entering figures into a few fields. I then want to add those figure to the total fields on the other form.

This is the code I'm using without success

Forms![MattersFileFrm].[AmountPaid] = Forms![MattersFileFrm].[AmountPaid] + Me.AmountTotal

Forms![MattersFileFrm].[CommisionPaid] = Forms![MattersFileFrm].[CommisionPaid] + (Me.AmountTotal * 1.2)

Forms![MattersFileFrm].[AmountOwed] = Forms![MattersFileFrm].[AmountOwed] - Me.AmountTotal

My referencing to the other form fields is wrong .

View 9 Replies View Related

Forms :: Clear Fields On Form Open

Jan 2, 2014

I have a timesheet form that pulls from a query that pulls from a table I want to clear my daily charges and reset back to the default value of 0 when my form opens ...

Saturday, Sunday, Monday , Tuesday , Wednesday, Thursday, Friday

View 1 Replies View Related

Forms :: Open A Form Which Contains A Subform With Blank Fields?

Sep 7, 2013

I have a [Order Central table] that compiles products from four different categories that employees can order from.

Employees using the database will select from four categories on buttons which opens up the order form EX: [Category 1 form].

They enter their order info on [Category 1 form] into a subform sourced from [Category 1 Table] called [Category 1 subform].

Is there a way that they could select the "Category 1" button, which would run a macro opening [Category 1 form] with the [Category 1 subform] having a where condition of 1=0 (or just so that the subform appears blank)?

View 7 Replies View Related

Queries :: Open A Query Based On Two Or More Fields Of A Continuous Form

Nov 22, 2013

I have a subform which is a continuous form displaying a single combobox of trade names so there may be up to 4 or 5.i want to click on a button on the main form which will open a form based on a query that will display all personnel matching all or 1 of the trades in the subform?

View 2 Replies View Related

Command Button To Open Another Form - Matching Specific Data Fields

Aug 25, 2011

I have a subform in which I want to put in a Command Button to open another form.

I used the wizard as per normal, but when you come to matching specific data fields, there is nothing in my left hand column of the sub form. I have checked the record source property and it is bound to the correct table.

I have read that this is an issue with Access 2007? Is this the case or am I missing something obvious here?

View 3 Replies View Related

Enabled - No

Aug 14, 2007

HI
Does anyone know a way to stop the text box going grey when you un enable it?

View 3 Replies View Related

Tick Box Doesn't Appear Enabled.

Jun 23, 2005

Have a number of tick boxes on different forms. When the form is opened the tick box appears to be greyed out however it is enabled. Is there any way that these tick boxes can appear enabled???

View 2 Replies View Related

Required Field If Enabled.

Aug 7, 2006

After some suggestions, I have a form with combo boxes, the combo boxes are set to enabled "no", but become enabled by an after update command on another field.

The after update command works perfectly, however once enabled I need to ensure data is selected, as opposed to leaving blank.

Any ideas on the best/easiest way?

View 14 Replies View Related

Check Box = Visible/Enabled

Jun 16, 2005

Hi,

I am having a mare trying to do something which I think should be quite simple, as follows.

In a table I have the field [Entitled]. On my form I have this as a yes/no check box.

I have the following code in the VB.

Private Sub Check112_AfterUpdate()
If Me![Check112] = True Then
Me![Entitled].Visible = True
(or I could use) Me![Entitled].Enabled = True
Else
Me![Entitled].Visible = False
(or I could use) Me![Entitled].Enabled = False
End If
End Sub

Some people have the field checked and others do not.

The problem is; when I check or uncheck the box on individual records shown on the form, the value is remebered when I scroll to the next record (i.e. the box may be unchecked but the field is still visible/enabled). It is doing my head in! Help Please.

Mac

View 3 Replies View Related

Command Button.Enabled = False

Jun 15, 2005

I have a form with many command buttons. This form is a master for a database that keeps time for my department. One command button is a setup button that I want the user to run once and only once. What code, and where do I put it will allow my to set the command button's visible or enabled to be false. Even when the user closed the database and reopend it, if the user has run the setup once, I do not want to allow them to run it again.

Thanks.

View 5 Replies View Related

How I Can Set A Text Field’s Properties Enabled = No

Jun 12, 2006

In a simple data retrieve/update form, how I can set a text field’s properties Enabled to No based on that particular record value?

For instance, there are 4 fields, employeeid, employeename, employeetitle, employeephone
I would like to set the employeephone text field’s properties Enabled = No, if the employeetitle is Manager

Can anyone help?

View 4 Replies View Related

Forms :: Setting A Control To Enabled

Oct 25, 2013

I want a combo box to be enabled only when I want to edit the data in the cbo for that particular record or when the fo0rm is on a new record. So, by default the cbo is Enabled No and Locked Yes. I placed a button on the form and put the following in the On Click:

Code:

Private Sub cmdEditContactsType_Click()
Me!cboContactFilter.Enabled = True
Me!cboContactFilter.Locked = False
End Sub

But when I press the button the control remains disabled.The field has several Contact genres and since I'm using the data in a split form allowing edits to the single form side I don't want this cbo enabled during browsing.

View 3 Replies View Related

SetProperty Enabled Not Working For Second OnClick?

Oct 7, 2013

I have a form for creating a new database record for a list of "components".

One button "add_component" adds a new record.
One text input "component_input" allows you to enter in the "name" of the component.
One button "save_component" saves the record.

The component_input and save_component have their default "enabled" property set to "No" in their properties list.

I only want the component_input and save_component form objects to be enabled once the "add_component" button has been clicked. Once the "save_component" button is clicked, I want them to return to being disabled. This will prevent any accidental over-writing of records.

I have used "build event" for the "add_component" button...

Code:
if [macroError] <> 0 then
## errorMessage here ##
else
setProperty
control name: component_input
property: enabled

[Code] ....

And then I have used "build event" for the "save_component" button...

Code:
if [macroError] <> 0 then
## errorMessage here ##
else
setProperty
control name: component_input

[Code] ....

Now, this works when add_component is first clicked, however when I click save_component neither component_input or save_component become disabled again.

View 4 Replies View Related

I Need To Change The Enabled Property After Changing Records

Nov 23, 2005

Hi Guys,

i have a problem i hope some one can help me with.

i have a form with a sub form on it, and i want to disable everything until the user clicks a 'edit' button to allow the information to be changed.

i am just testing it at the moment, so i set one text box's enabled property to false. then i added a button with an on click event with the following code:

Me!userid.Enabled = True

when i start the form, the userid box is disabled and when i click on the edit button, it enables it fine.

however, when i change to the next record, the userid box remains enabled. i cant find where to put the code to set it back to false everytime i change the record.

i should also let you know i am a beginner, so please be gentle!

View 2 Replies View Related

Modules & VBA :: Restrict Access For Those Without Macros Enabled

May 6, 2015

I created a database which when macros are enabled the only thing visible on the screen is the forum. All tables as well as the ribbon bar is disabled. I also disabled right-clicking.

My issue is, for those who do not have macro's enabled, it opens up in design view and allows access to the left-hand tables until the user clicks the trust button at the top. Once trust is clicked, everything hides as expected.Is there a way to restrict access if they do not have their macros enabled?

View 1 Replies View Related

Exporting A Table To A Macro-Enabled Excel Workbook?

Apr 5, 2012

I am using Office 2007 and trying to export a table in Access to a Macro-Enabled workbook in Excel. Unfortunately, when I go to export the table, my file does not show when I browse for the file and .xlsm doesn't look like it's a supported file extension. I have looked around and noticed others have this problem as well. One solution was to use save the Excel file as a 97-2000 file since it doesn't change the file extension based on having macros. However, I can't do this because then I lose functionality with tables and other things on my spreadsheet. I need the data in Excel to be updated every month. Is there any way to do this in Access? I'm going to explore using sharepoint. My DB options are limited to Access and Sharepoint. I don't have access to Oracle or SQL Server or MySQL etc.

View 1 Replies View Related

Forms :: Change Button Enabled Status On Field Values

Jun 22, 2014

I have several buttons on a form and I want to set enabled = false on one of them when I open the form - that's fine

I have two txt fields - ReceiptNo and BankPaymtId if the both have a value I want to make the button enabled = True

This is the code I have used on the BankPaymentId On Dirty event

Private Sub BankPaymentId_Dirty(Cancel As Integer)
If Me.[ReceiptNo] <> "" Then
If Me.[BankPaymtId] <> "" Then
Me.CreateOutlay.Enabled = True
End If
End If
End Sub

This is the one for ReceiptNum on Dirty event

Private Sub ReceiptNum_Dirty(Cancel As Integer)
If Me.[ReceiptNo] <> "" Then
If Me.[BankPaymtId] <> "" Then
Me.CreateOutlay.Enabled = True
End If
End If
End Sub

Nothing seems to be happening.

Even the Form on Dirty is not working now....

View 4 Replies View Related

Forms :: When Open A Form / Want To Open Another From At Same

Jan 14, 2015

when i open a form i want to open another frm at the same time. i have a main form with some buttons in it. when i click on a button and a form opens then i am not able to click on a button to open other forms from the main form.

View 2 Replies View Related

Closing An Open Form From Another Form That Is Open

Dec 17, 2004

Is there a way to close a form that is open from another form that has the focus. I tried using the Unload event, but I received an error message "Cant load or unload the object". I would appreciate any help!

View 1 Replies View Related







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