Forms :: Copy Specific Fields From Selected Record To Specific Fields In Subform?
Jul 9, 2015
I am new to access i have a problem which is i have made a form which contains a subform and a read only subreport, what i want is the ability to select a record in read only subreport as in the picture attached and make a button that when i press on it, it should copy the values of the itemsID field, Packing field, ContainerNo field and origin field from the selected record and then paste them in the subform below.
Also i want to add more then one item, so the when i press on another record it should paste the values below the first record.
View Replies
ADVERTISEMENT
Mar 28, 2005
;) Hey everybody,
I am working on a database used in recording device characteristics/test information. The main table of information has dozens of columns for test/part detailed information. When inputing the data for each specific test, many of the info. details are repeated when testing say 20 devices of the same part all at once. Rather than retype every piece of detailed information in every field, everytime, is there an easier way? Does anyone know of a way to make specific fields copy/paste the previous record's information in the fields automatically when a new record is created? Please, if anyone could help or has ANY ideas, let me know...
Thanks
gunwax
View 9 Replies
View Related
Feb 16, 2014
I'm new to Access but comfortable with Excel and VBA.I'm trying to transform a VBA-heavy form from Excel into an Access database, as multiple accessing is required, as well as data analysis. The situation is I have a form where users enter data (name, account number, date, etc). The account number is unique, and I have a table of approximately 14000 account numbers which contains the company name, address, and other details for each account number. I've set the account number as the primary ID on the accounts table.
What I would dearly love to be able to do is: when the account number is entered on the form, it is searched for (e.g. by the user clicking a button) from the accounts table. If it is located, the 7 fields in the relevant row are displayed in 7 textboxes on the form. I do not want to record the address, just display it on the form so the user can choose whether or not to use it.
So far, I have found GetRows, which seems to be able to convert the fields into a 2D array... this could be usable. But how can I do the first bit - find the correct row in the accounts table based on the account number entered into the textbox on the form? Is it possible to do this behind the scenes? In other words, Access finds the right row and displays each field in its textbox on the form, without producing a report form first.
View 5 Replies
View Related
Jul 21, 2014
I'm working on a form with almost a hundred various fields (it's what my employer needs). He wants to be able to create new records with much of the same information as the old ones by clicking on a button that will copy the information to a new record, then clear certain specific fields (or some process that will safely create the same result). I don't need specifics on how to write the same line of code for each and every field I wish to clear.
Say I have a form with 5 fields: part_number, part_owner, procedure, file_name, and date.
How could I copy the record to keep the fields part_owner and procedure the same, but clear part_number, file_name, and date?
All of the fields are from the same table (no, it's not normalized...).
View 14 Replies
View Related
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
Oct 30, 2013
I have an access form that needs filling in daily by various people.
It's to document changes to a website and I currently have a combobox box set up for the various sections to state whether they are AMENDS, REVERTS or NO CHANGE.
I have set conditional formatting to then highlight these sections but am also trying to get it to work so that if the user chooses "NO CHANGE" then the data for that field copies over from the previous record.
I have set this up in the AfterUpdate code for the combobox, but nothing is happening, not even an error....
Code:
Private Sub COMBOBOX1_AfterUpdate()
If Me.COMBOBOX1 = 3 Then
Me.[FIELD_TO_CHANGE] = DLookup("[FIELD_TO_CHANGE]", "tb_TABLE", "[ID]=Forms![form_FORM]![ID]-1")
End If
End Sub
(Where 3 is the value of NO CHANGE in the combobox, and FIELD_TO_CHANGE, tb_TABLE and form_FORM being the names of the various elements)...
View 1 Replies
View Related
Sep 5, 2005
Hi everybody,
My question may sound you stupid but i am a newbie and i think you can help me...
My problem is,
I have records that have the id of a stuff and the error codes of the stuff which are occured in production. Therefore not all of the fields in the record are non-zero. I want to find the non-zero field/fields in a record...
Any help will be greatly appreciated...
Thanks...
View 1 Replies
View Related
May 28, 2015
Using Access 2010
I'm an expert user in Excel and am trying to learn more about Access, so I relate many of the functions to what they are called in Excel. And what I'm trying to do right now is count the number of fields in a specific record where the value is a specific result (CountIf).
For example, I need to return the number of fields in a specific record where the value is "Meets Requirements". The specific record will be determined by the Name, Contact, and Email fields (which together comprise the Primary Key).
Is there a way to count the values in multiple fields that equal "Meets Requirements"?
View 7 Replies
View Related
Jul 23, 2013
I want to hyperlink from a query direct to the relevant record in a specific form. I have a hyperlink field in the form which shows up in the query. When clicked in the query, this hyperlinks to the form but I cannot make it select the correct record in the form.How do I get it to select the correct record?
View 3 Replies
View Related
Nov 16, 2014
I have 7 combos, which for the most part set the value in another field - however, there are two values in the combo that do not have a value attached - one is AH, the other is SK. I have two textboxes (one for AH, one for SK) that I wish to have a count (preferably running) of how many times each of these values appears in the seven combo boxes.
View 5 Replies
View Related
Mar 31, 2013
I have a main form and a nested subform. The main form is based on customer details and displays customer name and the customer primary key (custID). When this form is opened i pass two parameters to it, BPID and SIID. A BP is a business picture and a SI is a sales interaction. These are in a one to many relationship.
The subform displays a sales interactions (si) of a business picture (bP).The subform is set up with master child links of custid;bpid. This restricts the subform to only showing records for the a specific customer and specific BP (the user can cycle through all the linked SI's using the record selectors.
When the main form is opened I want the subform to display the sales interaction the user has selected when opening the main form based on the passed SIID but cannot get this to work. At the moment the subform just displays the first record.
View 2 Replies
View Related
Apr 9, 2013
I now want to update one field (what I type into it is irrelevant) but if this field is updated, it means quite a few others become Not Applicable and I would like that to be populated once I updated this one field. After Update is what I am looking for.I know it is simple (but will mean entering each field name) but it would save me truckloads of time.
View 2 Replies
View Related
Sep 23, 2005
Hi there,
Can someone help me on this issue?
I want to copy Postal Address Information to Visit Address Information wthin the same record, in my Contact Database that I am building at the moment.
I want to copy 4 fields to 4 other fields within the same Record.
This the current code I use for the Copy-button:
---
Private Sub cmdCopyFields_Click()
Dim v1 As Variant
Dim v2 As Variant
Dim v3 As Variant
Dim v4 As Variant
v1 = Me!Field_a.Value
v2 = Me!Field_b.Value
v3 = Me!Field_c.Value
v4 = Me!Field_d.Value
RunCommand acCmdRecordsGoToNew
Me!Field_e = v1
Me!Field_f = v2
Me!Field_g = v3
Me!Field_h = v4
End Sub
---
The underlined part (acCmdRecordsGoToNew) is false part of this code, because it copies the Adress Info to a new record, instead of copying it in the same.
-Is there someone that can help me with this problem, to make the copy-button in the Form run properly?
-Are there other options to achieve te same?
I have put in a attachment, to give you guys a visual example of what I mean.
Thanks in advance,
Quinten
View 3 Replies
View Related
Jan 28, 2014
I have a form that displays details for a specific asset and a continuous subform that lists all the purchases for that asset. I have the following code in the On Click event for one of the fields in the subform:
Dim myOrder As Integer
myOrder = Me.txtOrder
DoCmd.OpenForm "frmOrders", acNormal, , "OrderID=" & Order, acFormEdit, , "Edit"
The problem is, when I click on any item in the subform, the code returns the value of the first item in the form rather than the one clicked on. If I open the subform on its own (outside the main form) then the code works fine. I can't figure out why it won't work in a subform.
View 6 Replies
View Related
Jun 2, 2013
I am in the of designing an access 2010 database for data entry. Is it possible to create a button on a form in which a prompt asks a user for which records to export. Then depending on the entry export specific fields (First Name, Last Name, DOB) to a specific excel 2010 workbook (setup) and worksheet (template)?
For example, if the user entry is 1, only record 1: First Name, Last Name, DOB is exported to the setup.xlsx (more specifically the template worksheet of the setup.xlsx). However if 2,3,4 are entered then records,2,3,4: First Name, Last Name, DOB are exported to the setup.xlsx (more specifically the template worksheet of the setup.xlsx).
View 1 Replies
View Related
Apr 12, 2013
I have a subform for which I want to loop through all the records and then copy one of the fields for each row into another sub form.
I came up with the bellow code but i get an error when I run it.
The error is an "error 438".
Code is at follows and I am copying the field called price:
Do Until Forms![Roll Out - Site Form]![Roll Out - Sign items pick list].EOF
[Roll Out - Sign items added].Form![Price] = [Roll Out - Sign items pick list].Form![Price]
Forms![Roll Out - Site Form]![Roll Out - Sign items pick list].MoveNext
Loop
View 4 Replies
View Related
Aug 6, 2013
I have fields on a form for the Date, the Start time and the Finish time. These won't change for the next 120 records. So, upon opening a new record, I'd like the Date and times to appear there already. But here is the crux: After about 120 entries, the date and Time changes, for the next 120 entries. So, once the 'batch' is finished, or I close access, the values do not need to be remembered until I enter a new record.
I copied something like the following from a book and tried running it with various modifications, just for the Date to start with, but no luck. (It did strike me as too simple for something, clearly, as unbelievably TRICKY as my problem...) I did find quite a few posts on this here but none seemed to work for me, or made sense to me in the slightest. (I did mention that I'm a complete rookie, didn't I?)
Private Sub Acquired_date_AfterUpdate()
Me!Acquired_date.DefaultValue = "'" & Me!Acquired_date.Value & "'"
End Sub
View 7 Replies
View Related
Mar 12, 2013
I have built a form that holds details of training records. What I want is when a drop down is selected in the main form, that it will populate some of the fields in the subform. I have this working at the moment, that for example, when a certain course is selected, that their modules will appear in the subform. Where my problem arises is that I have a relationship between two tables that I want to appear on the subform, so that details can be filled in on the subform against the list of modules that automatically appear.
View 2 Replies
View Related
Jan 30, 2007
Hey guys,
Is there a setting that will allow me to make specific fields in my table read-only unless I enter a password, or I am the DB administrator?
View 5 Replies
View Related
Oct 3, 2005
Hello, I have just spent ages doing searches and reading everything I can on locking. But, I have yet to find an answer as to how I can lock a specific field in a specific record.
e.g. Staff enter customer details, then at the end of the day the admin (me) checks it over and presses a big old button that stops them from locking certain fields in the current record only - they must still have access to the unlocked fields of the current record, and it must not lock any other records.
I'm guessing there's some VB code in the form of fieldname.lock = true, but then it locks the field throughout the whole table!
Can anyone tell me how to do this please?
View 11 Replies
View Related
Dec 9, 2005
Hello everybody. I am new to Access and as such I don’t know how to perform the following. Please help me out.
The project is about a library loan system. I have a database consisting of the following tables: member (MemCode, LName, …), book (BkCode, Title, TotalCopies,…), purchase (PurDate, BkCode, CopiesBought,…) and transaction (MemCode, BkCode, RentalDate,ReturnDate,Returned).
TotalCopies is the total no. of copies there are of the book
CopiesBought is the number of copies that have been purchased
RentalDate is the date on which book is being loaned
ReturnDate is the last date on which the book has to be returned
Returned is a Yes/No field to indicate if the book has been returned
In the library a member can take only one book at a time.
Problem 1:
The library may have several copies of a particular book, but all will have the same code. For example, a book, let’s say Harry Potter 6 has code 97. Initially only 1 copy of the book is purchased. When the librarian sees the book has great demand, he decides to purchase 3 more copies. All the copies will have the same code, i.e., 97. Only the TotalCopies will become 4.
BkCode is Autonumber in book table and Number in Purchase table. Relationship is 1:many.
I have a Purchase form to record details of books being purchased. I have a command button “Book form” that opens the book form when the user clicks on it. He will use it if the book being purchased is not already available in the library. What I want is:
(i)If he opens the book form to fill in details of the book, then when he closes the form I want the book details to automatically appear in the corresponding fields on the Purchase form.
(ii)The CopiesBought will have to be used to update the TotalCopies in the book table. How should I do this?
Problem 2:
When the user wants to record a loan, the system will need to check if that member already has a book which he has not yet returned. If it is so, then the system will need to provide a prompt to inform the user of this and consequently blocks the user from completing the transaction. How do I do this?
Thanking you in advance for your help.
View 2 Replies
View Related
Oct 1, 2012
We have a PHP website that utilizes an Access 2003 SP3 database. This website is used as an authorization process for a business process in our company. On the website, 8 different people must "sign off" on the process. This sign off process simply consists of typing your name and date into two different text boxes, as well as a third drop-down menu for "APPROVED" or "DENIED". These, of course, correlate to their respective fields in the Access database.
Within the past year or so, the 8th approval section was added. Since then, there have been sporadic issues where all of the approval fields would simply be erased and everyone has to go back to the form and "re-approve" their fields. I believe we have narrowed the issue to when the 8th person signs off before the 7th person. However, the approvals are not cleared every single time this happens, but this condition exists every time data is cleared. So my question is, would this be an issue related to access, or with the coding of the website?
View 3 Replies
View Related
Aug 16, 2015
I am using Access 2007. This is the problem; I have a warehouse divided into four departments North, East, South, and West. Each department is assigned its own storage location range North is N1-N1000, East is E1-E1000, South is S1-S1000, and West is W1-W1000. On the access input form of my database are two fields, one combo box field for Department and one combo box field for location stored.
When the user is updating the data base for parts received or shipped, the user must enter the department and location stored to correctly debit or credit that department. The location stored entered must be assigned to the department. (Example: dept. is north and storage location is N65, the user enters D65 instead, error message is displayed, "you have entered the wrong location").
What I need is instructions how to write the code to check the fields to verify location stored matches department, and display a warning message. How do I do this? I have a table with department names and storage location ranges.
View 3 Replies
View Related
Feb 14, 2014
In the footer of my report I have a field that sums the Transaction Amounts - =Sum([Transaction Amount])
I would also like to break the totals down further by Transaction Type Codes.
Something like =Sum([Transaction Amount]) where Transaction Type Code = AL-Exp-Paid
View 4 Replies
View Related
Feb 10, 2008
OK so here is a working query:
SELECT Assets.*
FROM Assets
WHERE (((EXISTS
(SELECT *
FROM LCAMdump
WHERE Assets.BarcodeNumber = LCAMdump.T_TAG
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((SELECT BuildingName
FROM Building_Names
WHERE ASSETS.BuildingNameID = Building_Names.BuildingNameID)=LCAMdump.BUILDING)
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((Assets.FLOOR)=[LCAMdump]![FLOOR])
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((Assets.DeskLocation)=[LCAMdump]![LOCATION_SEGMENT2])
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((Assets.BuildingLocation)=[LCAMdump]![LOCATION_SEGMENT1])
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((SELECT FirstName
FROM Employees
WHERE Assets.EmployeeID = Employees.EmployeeID)=LCAMdump.USER_FIRST)
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((SELECT LastName
FROM Employees
WHERE Assets.EmployeeID = Employees.EmployeeID)=LCAMdump.USER_LAST)
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((SELECT SSO
FROM Employees
WHERE Assets.EmployeeID = Employees.EmployeeID)=LCAMdump.LOGIN_SSO)
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((SELECT UserID
FROM Employees
WHERE Assets.EmployeeID = Employees.EmployeeID)=LCAMdump.USER_LOGIN)
)) =False));
It works great returns the correct results. But I don't need everything out of Assets. I just need a few things from there and a few things from 2 other tables.
I tried this but it now gives back over 220 repeating results.
SELECT Assets.BarcodeNumber ,
Employees.UserID ,
Building_names.BuildingName,
Assets.Floor ,
Assets.BuildingLocation ,
Assets.DeskLocation ,
Employees.FirstName ,
Employees.LastName ,
Employees.SSO
FROM Assets ,
Employees,
Building_Names
WHERE (((EXISTS
(SELECT *
FROM LCAMdump
WHERE Assets.BarcodeNumber = LCAMdump.T_TAG
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((SELECT BuildingName
FROM Building_Names
WHERE ASSETS.BuildingNameID = Building_Names.BuildingNameID)=LCAMdump.BUILDING)
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((Assets.FLOOR)=[LCAMdump]![FLOOR])
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((Assets.DeskLocation)=[LCAMdump]![LOCATION_SEGMENT2])
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((Assets.BuildingLocation)=[LCAMdump]![LOCATION_SEGMENT1])
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((SELECT FirstName
FROM Employees
WHERE Assets.EmployeeID = Employees.EmployeeID)=LCAMdump.USER_FIRST)
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((SELECT LastName
FROM Employees
WHERE Assets.EmployeeID = Employees.EmployeeID)=LCAMdump.USER_LAST)
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((SELECT SSO
FROM Employees
WHERE Assets.EmployeeID = Employees.EmployeeID)=LCAMdump.LOGIN_SSO)
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((SELECT UserID
FROM Employees
WHERE Assets.EmployeeID = Employees.EmployeeID)=LCAMdump.USER_LOGIN)
)) =False));
I am sure it something simple but I am a novice at this so please help me. :D
View 1 Replies
View Related
Oct 15, 2004
Dear All:
Code:
Private Sub Command150_Click()
On Error GoTo Err_Command150_Click
Dim stDocName As String
stDocName = "ENGINEERING-GRADUATED"
DoCmd.RunMacro stDocName
Exit_Command150_Click:
Exit Sub
Err_Command150_Click:
MsgBox Err.Description
Resume Exit_Command150_Click
End Sub
This is what I am using to export from access to excel. It works great! Many thanks to Mwalts and Colm. How do I go about exporting data to specific fields in excel?
Thanks to all,
Dion
View 2 Replies
View Related