Locking Fields For One Record On A Continuous Form

Jul 22, 2005

How can i apply the following code to the immediate record in my subform. I would like when the assigned check box value = true, then the fields for that record become locked.

Ive written the following code to an onclick event for a check box labeled "assigned" on my form, the problem is it executes on all the records in my form.

Q. How do i apply the code to only the immediate record?


Private Sub Assigned_Click()
If Me.Assigned.Value = True Then
Me.Serial_Number.Enabled = False
Me.Component_Group_ID.Enabled = False
Me.TypeID.Enabled = False
Me.Description.Enabled = False
Me.Status.Enabled = False

Else
Me.Serial_Number.Enabled = True
Me.Component_Group_ID.Enabled = True
Me.TypeID.Enabled = True
Me.Description.Enabled = True
Me.Status.Enabled = True

End If

End Sub

View Replies


ADVERTISEMENT

Locking Fields In A Form

Apr 29, 2008

Hi All,

I am really new to all of this and used to use excel for this stuff.... yes I know... I can hear the screems already .......... :):eek::rolleyes:

What I am trying to do is lock some fields in a form when they are entered so the data can not be changed after they move onto the next record. I think this might be done in the table but can not be sure.

Can anyone point me in the right direction? or some pointers please. Any help would be good.

Many thanks

View 3 Replies View Related

Locking Fields In Access Form

Jun 4, 2012

I have 4 questions (4 fields) in a form. 2 are drop down menu type and 2 are open text fields.I would like to limit the user from entering data in the fields if one has been answered. for example: if Question one is answered, question 2, 3 and 4 should be locked and should not allow the users to fill in anything. How do I create that Locking system?

View 10 Replies View Related

Form Opening And Record Locking

Oct 5, 2006

Hi,

I am opening a form, from another form, that is based on a table of 20000 records.

I am using the WHERE criteria to do this, code is included below. I need to provide database access to several users on a network (and only want to lock the record that the user has searched for), and was wondering if this mode of data access will lload and or lock all 20 000 records on the users sytem, or if it will just load and lock the specific record that has been opened using the WHERE condition to open the form...

Advice appreciated.

Regards

Mack

--------
CODE
--------
stDocName = "frmCONTACT"
stLinkCriteria = "[contactID]=" & Me![ContactID]

DoCmd.OpenForm stDocName, acNormal, , stLinkCriteria


End Sub

View 5 Replies View Related

Forms :: Hide Number Fields Of Specific Record On Continuous Subforms

Mar 8, 2014

I have a continuous subform recording the information of various wireless products for an employee embedded in an employee main form. Please see screen shot enclosed.

There is a check box "BYOD/Personal" on the subform. I want to hide a number fields when this check box on independent record is checked. However, if I use the following codes, the changes apply to all records under that employee.

Private Sub BYOD/Personal_AfterUpdate()

If BYOD/Personal.Value = True then
Me.Provider.Enabled = False
Me.XXX.Enabled = False....etc.
Else
Me.Provider.Enabled = True
Me.XXX.Enabled = True....etc.
End If
End Sub

How can I just disable those fields on the subform of a specific record when the BYOD/Personal field for that record is checked?

View 8 Replies View Related

Modules & VBA :: Highlight Record On Click Record Selector In Continuous Form

Oct 23, 2014

I would like to highlight record when user will click Record Selector in the continuous form. How to do it?

View 1 Replies View Related

Forms :: How To Get A Specific Record To Be First Record Of Continuous Form

Nov 8, 2013

I have a continuous form for which the recordsource is a query that retrieves dates from 10 days in the past to 10 days in the present. I want the record with today's date to be at the top of the form. The record with the oldest date is always on top. Is this a scrolling issue? How can I get the record with today's date to appear on top?

View 5 Replies View Related

Sort Continuous Form By Two Fields

Jun 25, 2006

Is it possible to sort a continuous form by two fields?

ie. If two records have the same value in one field, look at the second field to see which one is displayed first.

I was thinking that it might help to combine the two text boxes into one (a not visible text box) and sort it by that, but I don't know how to sort by an unbound, not visible text box either...

Any suggestions?
cheers, joe

View 1 Replies View Related

Populate Unbound Fields On A Continuous Form

Oct 5, 2004

Can I populate unbound fields on a continious form, if it is possible would you give me some code to look at or direct me to an article

Phil

View 2 Replies View Related

Forms :: Sort Continuous Form By Two Fields?

Jul 6, 2013

I have a form I would like to sort by:

first - by App_Flag (a yes/no field) - have all the clients with "yes" on top

second - by App_Date - from the earliest to the latest

The query sorts it fine but the form does not - even if I requery the form (added a requery button).

Can a macro or coding make it sort it the way I need it?

View 7 Replies View Related

Modules & VBA :: Sort Continuous Form On Two Fields

Jul 20, 2015

I am using the following by Allen Browne to sort one field. But now I need to sort on two fields.

Code:
Function SortForm(frm As Form, ByVal sOrderBy As String) As Boolean
On Error GoTo Err_SortForm 'Provided by Allen Browne
'Purpose: Set a form's OrderBy to the string. Reverse if already set.
'Return: True if success.
'Usage: Command button above a column in a continuous form:
' Call SortForm(Me, "MyField")

[Code] ....

View 10 Replies View Related

Continuous Form Last Record

Mar 22, 2005

I have a continuous form, which is used as a sub form in a main form. How can i put some code on a control which will work only, if the focus is on the last record (the event i would like to use is onKeyDown). I have tried using:

if Me.CurrentRecord = acLast Then ....

but to no avail.

Any suggestions please ?

Thank You

View 6 Replies View Related

New Record At Top Of Continuous Form

Mar 2, 2006

Hi,

This is probably a stupid question and I expect the answer is no but here goes.

I have a continuous subform showing records sorted to show the latest first.

I would like the empty new record to be sitting at the top of the list rather than the bottom, so my users don't need to scroll down to enter a new record.

Is this possible, and if so what is the setting I need to use.

thanks

Sue

View 4 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

Modules & VBA :: Populate Word Fields From Access Continuous Form

Jun 3, 2015

I have a form that I have exported certain fields into a word doc (it is up and running just fine). I created bookmarks in word and put some VBA into my access form, so when I click on 'Create word report' it pops up and automatically populates the record I am on. Here is the tough question,

How to make this work with a continuous form? My main form has several subforms, one being a continuous form. The main form shows one bridge at a time. The sub continuous form shows information for all of the bridges spans (could be anywhere from 1 to 9).

View 4 Replies View Related

Search For Particular Record On Continuous Form

May 16, 2005

I have a continuous form based on a query. In the form footer I have placed a text box and a command button. One of the text boxes on the continuous form is bound to the VIN field in the query. I would like the user to be able to place the last 8 digits of a particular VIN in the text box in the footer and click the command button to bring that particular record to the top.....

View 5 Replies View Related

Empty Record Appear First - Continuous Form

Jul 23, 2005

In a continuous form, I know you can groupby in descending order. If you do this on a date field, then the newest record appears at the top. How do I make the blank record for entering new records appear at the top of the form instead of the bottom. Thank you.

View 1 Replies View Related

How To Highlight A Record In A Continuous Form

Nov 11, 2005

Hello all,

This is my first post. I have been trying to find a solution for the following issue. I have a Continuous form and I would like to highlight the record by clicking on any of the fields in that record, tried everything with no luck, any ideas?

Thank you

View 4 Replies View Related

Delete Record On Continuous Form

Mar 2, 2006

I need to have a button on my continuous form that deletes the corresponding record... I used the wizard to create the button, but it doesn't seem to work...

Any Ideas?

View 4 Replies View Related

Continuous Form Record Sorting

Mar 17, 2005

I doubt this is possible, but I'll see if anyone out there knows how to do this...

so i have labor entries that consist of a laborID (the guy doing the labor) the serviceID (service being performed) and all the payment info (peripheral, not really important). what i would like to do is add a field, Area, that describes where on the house the labor is being performed, ie the roof, the master bedroom, the kitchen, etc...

is there any way to sort these using continuous forms (maybe 2 continuous forms?) kind of like in a report where it goes, for instance (ignore periods, for spacing only):

Area: Roof
.....Tearoff yadda yadda
.....Replace yadda yadda
Area: Kitchen
.....Redo electrical yadda yadda
.....Replace toaster etc etc
.....Fix plumbing etc etc
Area: Bathroom..... etc

thanks for any ideas...i know this is ridiculous, but i figured i'd give it a shot

View 2 Replies View Related

Forms :: Continuous Form With Command Button On Each Record To Open Another Form

Jul 30, 2014

I have a continuous form in which I put a command button for each record called "detail". I would like to click on the "detail" button and make it open another form containing all (and only) the info on this record.

At first I refused to use an "id" to link both forms, but finally I added the "id" in the table... however still does not work.

continuous form: "04 - GASTOS_BUSQUEDA"
id field on continuous form: "Gastid"

pop-up (details) form: "GASTOS_EDITAR"
id on pop-up (details) form: "editar_id"

This is what I have tried on the "click" properties of the "details" button field (called "btn_editgs"):

1)
DoCmd.OpenForm "GASTOS_EDITAR", acNormal, , "[editar_id] = " & Me.Gastid

2)
DoCmd.OpenForm "GASTOS_EDITAR", , , "[editar_id]=" & Me.Gastid

3)
stLinkCriteria = "[editar_id]=" & Me![Gastid]
DoCmd.OpenForm "GASTOS_EDITAR", , , stLinkCriteria

4)
Private Sub btn_editgs_Click()
On Error GoTo btn_editgs_Click_Err
Dim strWhere As String
strWhere = "[editar_id] = " & Me.Gastid
DoCmd.OpenForm "GASTOS_EDITAR", , , strWhere
btn_editgs_Click_Exit:
Exit Sub
btn_editgs_Click_Err:
MsgBox Error$
Resume btn_editgs_Click_Exit
End Sub

View 9 Replies View Related

Correct Picture To Each Record In Continuous Form

Jun 15, 2006

Hi Good-Morning (its morning here in Jamaica) (Whatever time of day it is where ever it is that you great minds are in this beautiful world we live)...

I created a form and used an image control with a filepathfield that is stored in my table,... that works well as far as displaying the correct picture for each record...

I now want to create a Continuous Form with the correct image displayed for each row or eachrecord///

The problem is all of the images are displaying the same picture, but i want them to show their correct pictures... I used an on current event which i guess is why tha is happening cause all the pictures change when different record selectors are clicked...

Please advise how i could get around this...
I looked at the Northwind database, but that database uses an OLE object, I would like to use the filePath field that i have in my database...

Any Ideas? Thanks in Advance

View 2 Replies View Related

Use Specific Record In Continuous Form For Event?

Oct 10, 2006

Hello,

I have a continuous subform that shows 2 records consisting of a text field and a yes/no field.
I was wondering if it was possible to take the state of one particular of the yes/no fields to trigger an event. Specifically, when one of the questions is checked [true] then I would like to make visible another subform on the main form.

Can this be done, and if so, how, or should I just leave my subform visible at all times?

Thank you.

View 12 Replies View Related

Queries :: Combobox In Continuous Form Record

Dec 2, 2014

A continuous form with fields Operation bounded integer, LibelBx unbounded combobox string with two columns as Sorter (Int), Phrase(str).

A table TargetTbl with field Operation(Int). A table TextArrayTbl with fields Phrase(str), Sorter(Int).

Relationship between TargetTbl and TextArrayTbl is one to many joined on Operation = Sorter.

I am trying to display the form. RecordSource = TargetTbl. LibelBx.RowSource = TextArrayTblQy.

The idea is to display every record from TargetTbl with Operation equal to Sorter from TextArrayTbl. The LibelBx combobox should display the Sorter and Phrase.

The queries are:

Code:
TextArrayTblQy = "SELECT TargetTbl.Booking, TargetTbl.Operation, TargetTbl.CodeBilan, TargetTbl.Debit, TargetTbl.Credit, TargetTbl.Total, TextArrayTbl.Sorter, TextArrayTbl.Phrase
FROM TargetTbl INNER JOIN TextArrayTbl ON TargetTbl.[Operation] = TextArrayTbl.[Sorter];"

Code:
TextArrayTblQy = "SELECT TargetTblQuery.Sorter, TargetTblQuery.Phrase
FROM TargetTblQuery, TextArrayTbl, TargetTbl
WHERE (([TargetTblQuery].[Sorter]=[TargetTbl].[Operation]));"

Code:
TargetTblQuery = "SELECT TextArrayTbl.Sorter, TextArrayTbl.Phrase
FROM TargetTbl, TextArrayTbl
WHERE (((TextArrayTbl.Sorter)=[TargetTbl].[Operation]));"

I managed to get the TexArrayTbl displayed in LibelBx combobox, but it displays all the records whereas I want it to display only the ones with Sorter = Operation.

View 2 Replies View Related

General :: Continuous Form With Textbox Record?

May 15, 2014

I'm building a database to control projects of new products for a company, the flow is easy:

-Step 1: Record the general information in a main table (db_master_info) (i.e. project name, description, date of launch, etc.)
- Step 2: Record the product codes in a detail table (db_units) (i.e. product codes and quantities)
-Step 3: Record monthly information like, production and sales forecast in the detail table (db_units)
-Step 4: Build a monthly stock equation(production minus sales forecast) and record a comment, in a comment table (db_comments), about the results.

The steps 1,2,3 and 4 I did successfully!

The step 5, I'm unable to think outside of the box!

I drew a sketch (form_stock and comments.jpg attached) that might be a possible solution...

Use a continuous subform with a unbound textbox with VBA to load record and edit/update???

How do I do this?

View 3 Replies View Related

Modules & VBA :: Go To Last Record In Continuous Form And Highlight It?

Sep 8, 2014

I have a log of items I currently inventory. When you click on an item, it opens another form with a sub-form that lists the history of changes for said item in a continuous form display.

What I want to be able to do is when that form is opened, the sub-form will highlight the last entry (either bold it, or change the background).

View 8 Replies View Related







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