Limiting Subform Data

Jul 8, 2005

Hi,

I'm baffled by this ...

One of the forms in my database has a subform. The subform displays data from a table which is related to the data in the main form (also powered by a table) through a key relationship. So long as the relationships are set up correctly, the correct data magically appears in the subform as you scroll through the records in the main form.

I've tried to do this a second time, except in this instance the subform is displaying data from a query, and the data is related to the data in the main form not through a direct key, but through a link table. I've set up the relationships properly as before, but this time the subform stubbornly displays all the data from the query, not just that which is related to the record in the main form.

What am I doing wrong?

View Replies


ADVERTISEMENT

Limiting A Dropdown List In A Subform From Within The Subform

Jun 25, 2007

I have a subform within a main from which switches by entry. The subform is a datasheet. I have two dropdowns in the datasheet and I want to limit one off of the other. I keep getting a prompt. The prompt is Forms!CLTS Subform!Environment. To my understanding it looks like it can't find Environment. Does anyone know the proper format.

This is my code for the second drop down in the subform.
Also special note Environment is what I am referencing to and it also is in the subform.

SELECT PackageName.PackageNameID, PackageName.PackageName, PackageName.EnvironmentID
FROM PackageName
WHERE (((PackageName.EnvironmentID)=[Forms]![CLTS Subform]![Environment]))
ORDER BY PackageName.PackageName;

View 2 Replies View Related

Limiting Records In A Subform To 24 - How To

Nov 17, 2005

Ladies / Gents !

I am writing a database for my work environment to enter sample numbers in a predefine batch. My Form contains information to identify batch ID. Attach to this form is a subform which I would like to limit the number of records to 24.

exsample: form : as unlimited records
subform: only limited to 24 records within the master form.

Now, everytime i create a new record in the master form , I should be allowed to enter only 24 records in the associated subform.

Does anyone have an idea on how to accomplish this !! Your help would be greatly appreciated.

Thank You

View 1 Replies View Related

Modules & VBA :: Limiting Dates Entered In Subform

Jan 20, 2014

I have a subform which users log their daily working hours (Mon - Fri) for 2 weeks. The subform is limiting the number of records to 10 or less. I would like to begin including the weekend in the form but don't want to include them as part of the 10.

Here is my code which works fine if I am only looking at the recordcount values.

The date field is [Reporting Date]

Private Sub Form_Current()
If RecordsetClone.RecordCount >= 10 Then
Me.AllowAdditions = False
Else
If RecordsetClone.RecordCount <= 10 Then
Me.AllowAdditions = True
End If
End If
End Sub

View 2 Replies View Related

Limiting And Storing Data From Another Table?

Dec 4, 2013

I have two tables one that lists accounting codes by county and one that a user will have an entry by county which needs to store the applicable acct code from the other table. I want the user to be limited to the use the accounting codes assigned to their county only when they enter data on the second table.

Table examples:

County
Code
Funds Spent
Accounting Code
Date Entered
Aitkin
123
$20.00

Give the user the choice to select only the Aitkin Acct Codes from the Accounting Code table.

12/4/2013
Aitkin
112
$23.00

Give the user the choice to select only the Aitkin Acct Codes from the Accounting Code table.

12/4/2013
Becker
145
$12.00

Give the user the choice to select only the Aitkin Acct Codes from the Accounting Code table.

12/4/2013
County
Accounting Code
Aitkin
4872727001000000
Aitkin
4842727001000000
Becker
4872727005000000

View 14 Replies View Related

Forms :: Limiting Input Data Record For Patient In Same Month

May 23, 2015

How to limit input data on the same month for each patient? The field is a data/text box on a subform

I found this code on Form Current Event!:

Code:
Private Sub Form_Current() Dim intMaxNumRecs as Integer
intMaxNumRecs = 5 'Max Number of Records to Allow
If Me.NewRecord Then With Me.RecordsetClone
If .RecordCount > 0 Then .MoveLast: .MoveFirst
If .RecordCount >= intMaxNumRecs Then
MsgBox "Can't add more than " & intMaxNumRecs & " records in the demo database!" .MoveLast Me.Bookmark = .Bookmark
End If End If End With End If End Sub

But I want a monthly limit...

View 1 Replies View Related

Subform Blues - Data Entry Setting Itself To 'No' & Requerying 1 Subform From Another

Dec 5, 2006

2 Subform problems

I have a data entry subform that is only supposed to show an empty record ready to be populated, and a display records subform that is supposed to show all the records. The subforms are both on the same tab of a tab control on my main form.

Problem 1:
The data entry subform shows all the records rather than a blank record. Something on my main form is causing it to show the records when it should not. Any ideas? The Data Entry is set to Yes.

To try to isolate the problem, I created a new form and added the subform to it where it behaves properly:confused:

I then added Me.DataEntry = True to the form open to see if that would solve my problem but it still sets the data entry to no.

If I have the properties box open when in form view of my main form, I can set the data entry to Yes and it works fine until I move to the next record of the main form when it resets to no. Teraing my hair out here.:mad:

My final attempt was to search the entire project to see if there is a "DataEntry = False" somewhere but there isn't. What is setting this property? Any ideas where I should look?


Problem 2:

After entering data in the first subform (data entry form), I want to re-query the second subform but I just can't get the syntax right. I have wrestled with the "Syntax for subs" document downloaded from http://www.mvps.org/access/forms/frm0031.htm (Microsoft MVP site) but to no avail.

My main form is called fdlgPrjDetails, the data entry is via fsubPrjCommentsUsersDataEntry and the subform I wish to requery is fsubPrjCommentsUsers.

None of the attempts below worked giving a cannot find control error.


Private Sub Form_AfterUpdate()
On Error GoTo ErrHandler

Me.Requery

'Me!fsubPrjCommentsUsers.Requery
'Me!fsubPrjCommentsUsers.Form.RecordSource.Requery
'DoCmd.Requery ([fsubPrjCommentsUsers])
'DoCmd.Requery [fsubPrjCommentsUsers]

ExitHere:
Exit Sub

ErrHandler:
MsgBox Err.Number & " - " & Err.Description & Chr(13) _
& Chr(13) & "Error in fsubPrjCommentsUsersDataEntry: Err 003"
Resume ExitHere
End Sub


Any Ideas?

Both problems have me stumped so I'll be grateful to anybody with a scoobie on this.:)

View 10 Replies View Related

Limiting A Value In A Field

Oct 21, 2005

I'm trying to limit the amount a user can enter into a employee discount field in a table. I would like to set up a validation rule in the table to limit the discount to no greater than $0.20 or 20 cents. Anyone have any recomendations? Thanks..

View 1 Replies View Related

Limiting Entries

Feb 14, 2008

Hello, I need help. I have two tables.

horse_entries
ent_HorseName (PK)
ent_entries

horse_information
inf_HorseName (PK)
inf_Ground
inf_Notes

It is a many-to-many relationship. When I open a table and enter a record there is a small + sign that allows me to open up the rows from the other table to enter directly into it. Can this be turned off? Also I can enter more than one record through this way. I only want one entry in inf_Ground, inf_Notes and inf_Entries for each HorseName. How would I do this? As you can tell I am completely new to Access and trying to learn. Thanks :)

View 2 Replies View Related

I Need Help Limiting A Field

Nov 8, 2005

Im doing a database booking system and i need to limit the amount of people to 160 per night. At the moment i have a query that sums up the bookings per date but i dont know how to then limit this column to 160.

View 2 Replies View Related

Limiting Duplicates

Jan 31, 2006

Hello All,

I have a table “subdivisions”
With a daughter table “lot numbers”

I need to limit lot numbers to no duplicates in the LotNumber field, within a subdivision, without limiting it to no duplicates in the table.

Any clues?

LotNumber is a text field.
LotNumberID is autonumber, primary key

Preferably this would be accomplished in a query.

View 3 Replies View Related

Limiting Results

Aug 15, 2006

I have this table

AircratfID
Flight
Time

I have a aircraft logbook with 4 entries for page

I tried to build a query that shows
"Time until this page"
"flight time"
"flight time"
"flight time"
"flight time"
"Time to copy to next page"

Anyone? Thanks

View 3 Replies View Related

Limiting Changes To A Combo Box

Oct 12, 2005

hi,

we have this database that's used by differerent departments and one of the fields on the form has a combo box for status (pending / completed etc). when this is set to 'Complete' we would like to make sure that it can't be changed again, is this possible?

there is only one table used in this database and updates to other fields are still required so it is only this one combo box that need to be blocked from change once in the completed stage...

Thanks in advance

View 3 Replies View Related

Self-limiting Combo

Mar 24, 2006

Hi,

Just a quick question, is it possible to have a combo box in a continuous subform that automatically limits its rows based on the selections made in the other child records/combos (for the same parent record)?

Cheers,

Bobadopolis

View 10 Replies View Related

Limiting Drop Down Value Use

Apr 22, 2015

I have a subform in datasheet view on a main form. The subform contains a drop down field with multiple values. I am wondering if it is possible to limit the use of one of those values by account. Basically there are 5 values (contact info updated, initial DM Contact Made, sent email/left voicemail, opportunity create, Follow up call with DM) and I only want user to be able to select the value Opportunity created once per account. The others he can select as many times as he wants.

I attached a screen shot of what the form/subform looks like.

View 14 Replies View Related

Limiting Play Within The Databank

Sep 22, 2005

Hi there

This is my problem

1) I have just spilt my data base into the front end and back end. I did this not using the wiszard. What i would like to do is to limt total acess to my databank. I want guest to be able to view my data and those who are allowed to can edit the data. How do i do this exactly

2) I want to be able to watch closely and see who is doing what, i would like to record, in a table, those who edit the data and those who enter data. i would like to keep track of whats going on in my data bank. So to seen when the data was newly added and what data to my data bank and to see who and when the changes have been made.
____
new
if there is a simple way to add the password system i am all ears

Thanks in advance.

g.

View 2 Replies View Related

Time Now Between Limiting Values

Mar 21, 2006

Need some ideas on how to detect if Time Now is beteen preset values.

It is in connection with a Machine Monitor system being I am probably going to be asked to develop.

Problem is night shift. They work normally 20:45 to 06:45 following morning

I will be accumulating elapsed minutes of shift and working minutes by running an On Timer event updating both values by 1 each minute providing certain criteria are met.

One of the criteria will be that machine is supposed to be working.

So I was planning to set a flag indicating Working Yes or No based on the Time Now being between start and end times.

This is fine for normal day working and normal day shifts but is a problem with Night Shift.

Ideas on how to handle welcome

len B

View 8 Replies View Related

Limiting To Just Combo Box Choices

Dec 20, 2006

Hello,

I am figuring this must be an easy question. I have combo boxes setup and working great. I just noticed that I can put my own text into the box and not be limited by just the choices in the combo box. If that makes sense.

When I try to lock the boxes then it doesnt allow me to select. I want the combo boxes to be the only selection they can make, and not be able to put their own text in.

Attached a screenshot to help clarify.

Anyone know what option I am missing?

Thanks.

View 2 Replies View Related

Limiting Records In Query

Feb 11, 2008

Hello,

i have tried to find an answer but can't seem to find any posts that apply.

I need to limit the records returned in a query to 3. Well, that is fine, i have set it to do the top 3, and it is working well, I am looking at the top percentages received in a number of criteria. However we have just discovered a situation where someone has 7 all with 100%, so all 7 records are being returned. I can see why, i just don't want them to be!

The report based on the query requires only three records, in this case we don't care which 3, seeing as they are all equally good, in fact randomness is a boon.

Any ideas out there - i 'm stumped!

Anna

View 2 Replies View Related

Limiting A Field To A Particular String

Dec 14, 2005

On My form I would like to have code to limit what can be put into a field e.g

If Me.Myfield is not = to A, B or C
then
message
"You must enter A, B or C in this field"
EndIf

Any help please ?

View 6 Replies View Related

Limiting List Box By Another Field

Apr 25, 2012

I'm trying to limit the funders under previous applications to ones with the same name so then when you click on one it loads that other funding application details...

Code:
SELECT [Sheet1].[ID], [Sheet1].[Funder] FROM Sheet1 WHERE [Sheet1.Funder] Like [Sheet1].[Funder] ORDER BY funder;

Code:
[Sheet1.Funder] Like '" & [Sheet1].[Funder] & "*' ORDER BY funder;

[code]...

View 14 Replies View Related

Limiting Size Of A Field

Aug 14, 2013

Im doing a coursework on ms access on School Management System. I have a table 'tblSubject' containing fields: 'Subject ID' and 'Subject Name' . A student has the right only to choose a maximum of 8 subjects, that is , the field 'Subject ID' must have only 8 records/entries. How to do this ???????

View 1 Replies View Related

Limiting A List In Combo Box

Aug 20, 2013

I am very new to database design and application building. I work as general office support for a very small non profit. I have been tasked with developing a database to track HR and timesheet data and turning that into benefit reports. Actually, I was asked to create some spreadsheets to do this - but I strongly feel that access is a better solution than excel for this as we have around 150 individuals to track between all staff (part time, temporary, fulltime etc + regular volunteers).

So, the wall that I've hit that brings me to actually post instead of just search....

Some of our employees have more than one position, and in turn more than one rate of pay per month.

I created a compensation table that has the employee ID (from the employee table) and fields for position title, rate of pay and if that is per month or hour

I have a main timesheet table that assigns employee and month; and a details table that takes the timesheet ID and compensation ID with fund codes and hours worked.

My problem is that I don't know how to limit the combo box on the details sheet to just the positions assigned to the employee ID that matches the timesheet being worked with.

I tried all the design view access query options I could think of to limit the records in the combo and I always end up with all positions/rates of pay listed with no regard to employee ID....

View 1 Replies View Related

Forms :: Display Data In Form As Select Record In Subform In Data Sheet View

Nov 11, 2013

i have a main form named(EMP) i have a subform named(SEMP)with EMPID i have an another form Named(SDetail) with EMPID i want to open form Sdetail with filter records for data select in subform (SEMP) ,EMPID field Subform SEMP in as datasheet view. i can open sdetail for selected records only

View 14 Replies View Related

Limiting The Number Of Characters Displayed

Apr 12, 2006

Hello,

I'm trying to limit the number of text characters displayed in various fields on a form. I want it to appear so that after a certain number of characters it then displayed "..." indicating there is now information in a field.

Thanks for any help!

View 1 Replies View Related

Limiting Amount Of Records In A Table?

Apr 25, 2005

Hey! I'm doing Computing AS level and the coursework is to create a system for "Terry's Turkey". This is basically my first introduction to Access, and our teacher is little to no use!

After alot of work working out things in access and reading alot of books, other than creating the switchboard, theres only a few things left to do!

The first is to limit the amount of "turkeys" that can be ordered. I have 2 tables that this envolves... Order and Customers, they have a one to many relationship (each customer may place one or more orders, each order must be placed by one and only one customer). They are linked by Customer ID. I need to set two limits, I guess by a validation rule of some kind. The first is that each Customer can place no more than 5 orders. The second is that their can be no more than 40 orders in total. A slight complication to this is that a customer can "cancel" an order, in this case its marked as cancelled (theres a yes/no field called Active to determine this), and ideally, these wouldnt be included in the counts.

So far I have the following as a query, though I have no idea how to put this into a validation rule
SELECT Count(Orders.OrderID) AS Var1
FROM Orders;

I guessed that to expand this to not including inactive orders something like
SELECT Count(Orders.OrderID) AS Var1
FROM Orders
WHERE active="yes";

Any help at all would be most appreciated! I have spent many hours pondering over this is and looking at as many access sources that I can! I think this is my last resort :(

View 3 Replies View Related







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