Forms :: Can't Edit Or Add Any Data In The Subform Results With Previous Setting
Mar 28, 2015
i've got a Form that contains Subform with an embedded Query that contains 2 tables only (Payments & Invoices) the Join properties between them show all records from payments and what matches it from Invoices where the joined fields are equal (Invoice no).. So, when i enter certain data in the main form the Subform show the results for it from Payments table and only one field needed from the Invoices table !!
The problem is.. i can't edit or add any data in the Subform results with the previous setting, but when i completely remove the Invoices table from the embedded Query then swift to the Form and it's Subform.. i become able to edit and add data in the Subform easily... !!
So, how to enable the edit/add in the Subform with the 2 tables in the embedded Query ?! Cause it's really needed to show that field from the Invoices table.
View Replies
ADVERTISEMENT
Jun 5, 2013
I have an Access 2003 database. I have a form with 5 tabs. I want to prevent some users from editing data on some of the tabs.
I added some logic to the OPEN property of the parent form but it does not work. "Object doesn't support this property or method." What is the correct way of controlling access of the data on the tabs?
In the logic below I first determine the user's permission for each tab. If the user has read-only access they will not be allowed to edit anything on this tab. There are 50 fields on the accounting tab and a subform. If possible, I don't want to have to specify each field individually in the code. Plus there are 5 tabs with numerous fields on each.
BTW: [add designer] is the parent form and [accounting] is the tab.
If DLookup("[permission_studentacct_ReadOnly]", "Users", "Contact_ID = " & Forms![Global]![UserID]) = True Then
Forms![Add Designer].[Accounting].AllowEdits = False
Else
End If
View 3 Replies
View Related
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
Mar 28, 2006
To make a long story short I have a command button that runs a query and opens a subform based on that query. I want to be able to update the records that are returned (via the subform) but I am getting an error - "This Recordset is not updateable". I've tried changing the recordset property to Dynaset (Inconsistent Updates) but that didn't seem to change anything.
Anyone point me in the right direction?
View 1 Replies
View Related
Dec 4, 2012
I have a subform that is embedded in a main form. The database itself is a few years old and so I think redesigning is out of the question. What I am wondering is if there is any specific code that can go into the tables themselves and populate the form based on the previous record. I would like for the Transfer to Rehabber fields (To and Permittee) to be duplicated on the Transfer From Rehabber fields (From and Permittee) on the next record. Do you think that there is code that will be able to achieve such a thing?
View 12 Replies
View Related
Jan 3, 2014
I have created a form (races) with a subform (yachts in a race) to edit data in joined tables. It seems to be working well but I am having difficulty selecting which record to edit in the main form. I can scroll through the records until i get to the correct race but this won't work well when there are a large number of races to choose from.
I can see that I can use linked forms to select a race from a multi form or datasheet and call up my desired form by a double click on the ID field. This should work but isn't really elegant with users scrolling down a long datasheet to select the race record they want to work with. Is there a better way?
Races are uniquely identified by 3 attributes: SeriesDivision, Date & RaceNumber.I have created an index in the Race table for these 3 fields which forces them to be unique.I would love to create an interactive routine which asks users to select from a list for each of these 3 attributes and then returns the form for editing with the appropriate race record selected or even cascading - users select a SeriesDivision can then choose the valid dates for the selected SeriesDivision and can then select the valid raceNumbers for the selected date
View 1 Replies
View Related
Jun 14, 2005
I'm working on a pre-existing form. When I open the form, I am able to enter new data and this data gets stored in the database fine. If I close that form and reopen it, I cannot view past entries or edit them. I know of a property (Allow Additions, Allow Edits, Allow Delete) which can change this behaviour, but these seem to do nothing for this form. I have them all set on yes and it behaves as I've described. Ideally, I would like to allow edits of previous data.
I thought maybe the SQL query controlling the data wasn't returning any entries, therefore no entries would be displayed. So I saved the query and opened it up to see how many entries it did find. And it found all that it should have, so I know that the SQL statement controlling the form is what I want it to be.
So my question is this: are there anymore properties or values that I don't know about, that would control the mentioned behaviour of the form? Maybe something somewhere that I'm missing, that would make the form add only?
Thanks in advance for any help. Kevygee
View 2 Replies
View Related
Mar 9, 2015
I am trying to get the properties of enabled and locked set in a continuious subform depending on a yes/no field in each record. I have tried using the answer in thread 160062, but this only works when it is not a subform (unless I have done something stupid!)If the main form is frmMain and the continuious subform is frmSub, where am I going wrong with this code which is in the subforms Class Objects?
Private Sub Form_Current() If Me.MaterialIssue = True Then CRMSignOffDate.Enabled = True
CRMSignOffBy.Enabled = True CRMSignOffDate.Locked = False
CRMSignOffBy.Locked = False Else CRMSignOffDate.Enabled = False
CRMSignOffBy.Enabled = False CRMSignOffDate.Locked = True
CRMSignOffBy.Locked = True End IfEnd Submany.
View 3 Replies
View Related
Jan 5, 2014
I have a form frmDisplayVars with a subform subfrmDisplayVars. The sub form initially has its RecordSource set to "" and is set dynamically from a maketable when needed.In the OnLoad for the main form, the subform RecordSource is set to a table "Table.Test". This is so that the load routine can execute a maketable query to create the form "Test" in advance. This produces a table from a crosstab query. All this works OK so far.
However, I wish to be able to double click on the datasheet in the subform to then open another form with data related to the cell/contol that was clicked on. Essentially creating a room occupancy table for a range of dates and rooms. Rows are rooms and columns are dates.
I have a problem with setting the OnBblClick for the subform controls.For example the 2 test code lines for the control "RoomName" illustrate.
Code:
Forms!frmDisplayVars!subfrmDisplayVars.Form!RoomName.Name
Forms!frmDisplayVars!subfrmDisplayVars.Form!RoomName.OnDblClick = "=TestMe()"
The first line works fine and returns as it should the name of the control "RoomName".It is the second line which I need to set the event code for OnDblClick which fails with error no. 2455 which suggests wrong syntax for referencing a control on a subform.I can't set the event procedures manually as they are not known in advance until the table "Test" is made so need to be able to set the control events dynamically.
View 8 Replies
View Related
Sep 22, 2013
I have a form "Handover" on this form I have a button that enables edit functionality once clicked, I now have a subform on this form named "Bdown".
The Bdown subform allows edits without having to click the "btn_Edit" on the main form "Handover".
Is is possible to make the edit button on "Handover" control the edit function on "Bdown" also?
Currently "Handover" contains:
Code:
Private Sub btn_Edit_Click()
Me.AllowEdits = True
Me.btn_Edit.Caption = "Editing"
End Sub
[Code] .....
View 2 Replies
View Related
Nov 8, 2014
I have a query which looks for like * surname*
in tblemployee fname lname dept active
this works fine and i can search using a requery button
however as deptartments are stored in tbldepts
when i change the query to retrieve the dept name instead of number directly from the table and i try to change this on the datasheet subform it changes it in tbldepts instead?
how can i change what dept the employee is in (as in change the number in tblemployee - but display the actual name?)
View 1 Replies
View Related
Jul 29, 2015
I am building a very comprehensive Membership Management Database with extremely useful facilities initiated by some 20 or 25 Queries..
The database includes 5 Tables which store data relevant to members, another which stores details of Interest Groups and a 3rd which stores which members are affiliated to which Group or Groups.
Currently the database is accessible only by a very limited number of persons and data can be entered/edited by only one person. The database, using Access 2010, is maintained on a desktop computer and synchronized to a copy on a Cloud.
My requirement is to permit some 50 Group Leaders to input/edit data on a Password protected Group Members Form such that that is the only element of the database that they can access. The Forms would have only 2 fields from which the user would select entries from drop down lists.
My query is ; is such a procedure feasible in principle and would I be correct in assuming that the user would require to have available a copy of Access.
View 7 Replies
View Related
Apr 23, 2013
I have a simple data base with 2 tables. One table is the pertinent Employee data. That includes a EmployeeID that I contrived myself with the first 4 letters of the FIRST NAME and the first 3 letters of the LAST NAME.
how to make the program do that automatically when I enter the employee's first and last name.I have a form that sits overtop this table to populate the data. It's got some test date in it now c/w hand and manually calculated EmployeeID.
So now I figured out how to make the program do that calculation automatically. So why when I cruse over the records and tab through the fields and the form shows the new EmployeeID, it doesn't update the table for that field?
View 6 Replies
View Related
Jan 17, 2013
Is there a method of setting the default value for new entries to the same value as the previous entry?
For example, I have a quality control information table that stores QC data for different lot numbers. It is annoying to enter in the lot number and product code field over and over again if there are dozens of records per lot number. Is there a way for Access to easily display the previous entry as the default value?
View 1 Replies
View Related
Dec 21, 2005
G'day. I've been browsing the forum trying to find a solution to a problem, without much luck, and am hoping that someone might be kind enough to help me more directly.
I'm a biologist and a newbie to access: with the distinction of being completely clueless about VBA. Nonetheless, I have been tasked with creating a database for storing data obtained from biological surveys of juvenile salmon and harvest/spawner surveys of adult salmon.
The bones of the db are in place and functional. The problem I have is streamlining the data entry process to minimise keystrokes/mouse clicks.
I have a subform for entering fish records with attributes such as 'species_name', 'fork_length', 'count', 'presence of tags, etc. The idea is that fish can be entered as individuals (count=1) or groups (count>1) with attribute data at the appropriate level (eg, fork lengths only entered for individuals. We typically measure the fork lengths of the first 20 individuals of each species and then tally the remainder).
One problem I face is that fish often occur in schools, and it becomes quite tiresome to click and select the same species_name combo box value for each record when entering multiple individuals of fish of the same species.
What I would like to do is set the default value for that combo box (on the fish subform) to match the value entered for the previous record.
I suspect that you could use the after update trigger to execute some code to change the default value each time something is entered manually into the combo box. Unfortunately, I know nothing about how to write the appropriate code.
Can anyone offer me some guidance?
Thanks in anticipation.
Sincerely,
Craig Dolphin
View 11 Replies
View Related
Dec 16, 2005
SELECT idAuswertung, fiPrüffeld, fiAuswertungMaster, fiAuswertungTyp, AuswertungName, AuswertungSort, AuswertungActive, (SELECT COUNT ([idDiagramm]) FROM tkey_Diagramm WHERE fiAuswertung = [idAuswertung] ) AS AnzDiagramm
FROM tkey_Auswertung;
Why can I not edit the results when I use the Subquery above?
Without the Subquery all works fine.
Christoph
View 1 Replies
View Related
Jan 8, 2008
I have a query that gives me data from a table, and I then export it as text to Excel. In Excel I do some edits, insert columns with special characters as delimiters, then copy it into a JScript data set.
This all takes some time, and has a number of steps that need to be done in a certain order - prone to errors on my part...Is it possible to use VBA to make the changes in the query to reduce the manual steps perhaps even to remove Excell from the process entirely and just save the query to a text file?
The query has 5 fields:
TxtProductCode Unique to each item
curCurrentPrice The listed price
txtHeading The Main description of the item
txtDetails Additional details
txtVender A name of who has the item
In Excel I change all instances of '"' to ' inch', then insert the delimiter fields, and the final line for the item looks like this:
["TxtProductCode","curCurrentPrice","txtHeading","txtDetails","txtVender"],
Can VBA do this, or even read the query and modify each record then write it to a text file?
View 2 Replies
View Related
Sep 6, 2012
I've created a query where I am searching a database of job titles for contacts that are considered senior management.
One criteria I've entered into a query is as follows:
Like "*Vice*"
Which is meant to identify anyone with "Vice" in the title. The problem is I have noticed this also returns records with "service". So can I edit this query to specify that the "V" must be capitalized? I think this would serve.
View 1 Replies
View Related
Mar 7, 2013
I'm creating user form items (text boxes/combo boxes) for a user to enter data in. In this case it would be for a part. What I would like to happen is, if there is more than 1 part, then after the first part is entered, another part entry item is added below the first one but only if the first one has a value - for a virtually unlimited amount of parts. BUT if there is only say, one part to be entered, then the next section of selection appears directly below the blank next part. Sooo, something like this.......
Invoice:
Part1: (THE PART HERE)
Part2: (THE PART HERE)
Part3: (THE PART HERE)
...
...
...
...
Partn: (THE PART HERE) - blank
(aButtonThatProcessesThis)
OR.........
Invoice:
Part1: (THE PART HERE)
Part2: (THE PART HERE) - blank
(aButtonThatProcessesThis)
Is this possible?
View 2 Replies
View Related
May 9, 2013
So i have a combo box that has a criteria set for the query. I have a search button that runs the query that users click.
What i need to happened is i want the results displayed in the sub form the when query is ran.
View 7 Replies
View Related
Feb 21, 2014
I have a basic DB for recording supplier records, you enter a supplier ID and it performs Dlookups to run and display query results on the same form. That part works fine.
I've added a subform and linked it to an existing query which returns the suppliers top selling lines and the query picks up the supplier from the ID field on the main form, however when I enter a new id the subform doesn't update with the results specific to that supplier.
So I think I need a way of getting the subform to re-run the query each time I update the supplier ID field, but I can't see an option for this in the subform properties.
View 2 Replies
View Related
Mar 19, 2013
I have the main form open up where the Data entry is set to YES so it opens in New Field. I created a button to change the value of form's Data Entry to NO. It works. Changed the form so I can navigate through entered fields. I have created a drop down to filter a specific field "Claim#" and it will open that entry.
The drop down only works if I set the default form's Data Entry to NO. Dropdown works and I can select Claim#. But if I open the form with DataEntry set to Yes, and I click on the button to change the value to NO, the form changes but the drop down field does not pull up the proper information. The button code is.
Private Sub EditButton_Click()
Form_MainForm.Form.DataEntry = False
End Sub
The Claim drop down has this event after update
Private Sub ClaimSearch_AfterUpdate()
Me.Requery
End Sub
I'm missing something. Like I said, it works without having the button change the value.
Access 2010
View 1 Replies
View Related
May 30, 2013
I have these 3 combo boxes filtering results into a subform.
Code:
Private Sub Combo5_AfterUpdate()
If Len(Nz(Combo5, "")) > 0 Then
FindRFQsubform.Form.Filter = "[RFQ Title] = '" & Combo5 & "'"
FindRFQsubform.Form.FilterOn = True
[code]...
View 1 Replies
View Related
Feb 19, 2015
My Form is taking its results from a parameter query, and since my subform also has the same control source (the query).
It always prompts me twice, although not a major problem it is irritating!
Is there any way that when I type the search results once the sub form takes the results from the main form?
(P.S. The form asks me for parameters even when printing and saving, is there not a way that this can be stopped too by maybe taking the results off the current page?)
View 9 Replies
View Related
Mar 10, 2014
I want to enter text boxes on a form that are linked to certain fields on a table and when search criteria is typed in show the results in a table on a subform.
View 5 Replies
View Related
Oct 28, 2014
I have a main form (start_protocol) with an unbound subform (placeholderform).
Using a button in mainform I open a search form (search_protocol) inside the unbound form, by the code:
-------------------------------------------------------------------
[placeholderform1].Visible = False
[placeholderform].Visible = True
Me.placeholderform.SourceObject = "SEARCH_PROTOCOL"
--------------------------------------------------------------------
The search form (has a run query button) is build from a query named: search_protocol.
I want to be able, as soon as I pass the button, to have the results (from the query) inside the unbound subform, of the main form (Start_protocol).
View 2 Replies
View Related