Help - Strange Record Entry
Jul 15, 2005
I have two subforms on my main form. Both subforms are very similar and comprise two fields each. Both have an After Update event set on one field to enter the current date into the other field.
In one form I can update a record, press F9 and everything is smooth - I can proceed to somewhere else.
In the second form, if I update a record, the date is entered in the second field, but with black background, and I have to focus on the field, press Enter and then Esc (in the right order) to be able to proceed. I have tried many things to stop this as it is slowing data entry (just when I am starting to feel abit sleep deprived with an early start ahead).
Any suggestions greatly appreciated.
Matt
View Replies
ADVERTISEMENT
Sep 9, 2005
I have a table called 'students' with the appropriate fields. There is another table named parents_prof which contains records of common professions. The tables are related through the 'ID_parents_prof' of the 'parents_prof' table to two fields on the table 'students', thus 'students.father_prof' and 'students.mother_prof'.
1st question) Is that possible? Is it possible to create a relation between the key field of one table to two different fields of another table? Is it a good practice?
I did this because I want to build a query which checks for both fields together, meaning I want Access to return a record if the appropriate profession is in either field of mother's or father's profession.
SELECT students.surname, students.name, students.father_name, students.father_prof, students.mother_name, students.mother_prof
FROM parents_prof INNER JOIN students ON (parents_prof.ID_parents_prof = students.mother_prof) OR (parents_prof.ID_parents_prof = students.father_prof)
GROUP BY students.surname, students.name, students.father_prof, students.mother_prof, parents_prof.parents_prof
HAVING (((parents_prof.parents_prof) Like "*" & [enter profession] & "*"));
Access cannot represent the above graphical, so I had to enter the
OR (parents_prof.ID_parents_prof = students.father_prof)
in the SQL formula.
2nd question) Is the above proper query, according to the rules?
View 11 Replies
View Related
Feb 1, 2014
I am working on a database and i have notice after making a form that when i enter a record using a form if i enter incomplete data on the form access automatically save that record and generate a id for that record.
For example I have a table that contain
StudentID,StdName,FatherName,DOB,Adress,Phone
And I have created a form for that table that also containing these fields.
Here I want to do that on the form I want a "Save" button , and the purpose of this button that when I click on this button then MS Access Save the record and then generate the ID for that record and if i close my form without pressing "SAVE" button access do not save that incomplete record.
View 10 Replies
View Related
Mar 6, 2006
Hello All,
In my table, I have some records that are duplicated (aside from the primary key).
How can I select only one record from each set of duplicated entries? (There may be more than 2 of each of the duplicated records, but I only need to pull one of them...doesn't matter which one.)
i.e...Like a 'Find Duplicates' query, but only returning the top 1 primary key from each duplicated set.
Thanks,
Sarge.
View 2 Replies
View Related
Feb 2, 2005
Hi,
I would like to be able to abort a record input using code rather than the esc key on the keyboard.
Is this possible, if so can anyone help with the correct code or method etc.
Sue
View 1 Replies
View Related
Apr 28, 2006
Hi guys,
What would be the best control source to use for my sub forms detailed below:
I am designing an Asset Management System. Each the main Asset Table "TblAssetMain" has child tables "TblAssetType", "TblAssetDetails", "TblAssetEventLog".
When a new asset is created, the AssetMain form will have subforms for these three child tables (linked by Asset_ID = Subform![Asset_ID]).
Can I use a query of the child tables for data entry or, if I set the control source to the actual tables, can I limit the number of records in the child tables for each record in the Asset Main table to "1".
Basically each Asset will have one record in AssetMain and 1 relating record in each of the child tables i.e. you cant have more than one AssetDetail record for one Asset.
Did do a search and found the following code but not sure whether there is a way without using code?
Code:
Private sub Form_BeforeInsert(Cancel as Integer)
If Me.txtCount > 2 Then
Cancel = True
Me.Undo
Msgbox "Please return a book before checking out a new one", vbOKOnly
End If
End Sub
View 3 Replies
View Related
Aug 23, 2006
Hi all,
I created a form for entering employee skillset in Accounting.
I have set up three fields - one for Primary Skillset and the other two for secondary skill sets -
The skillsets are -Payables, Receivables, General Ledger, Purchasing etc.
How can I ensure that a user will not enter duplicate values in the three fields.
That is a user will not enter for examply "Payables" in the Primary Skillset, and Secondary Skillset fields.
I tried creating a multiple field index but it does ont appear to work.
I will appreciate all the help.
Thanks
View 4 Replies
View Related
May 8, 2014
I have a form that opens up and fills in all of the Orders Table when it opens.
I then have a subform that is used to fill in the order details.
Currently if they open the form and then close it, it creates a record in the order table. I want to be able to delete this record if no information has been filled into the subform?
View 7 Replies
View Related
Dec 12, 2005
Hello,
I have a quick question on how to enter the current date in a record automatically when the record is created.
Here is the situation. Say I have a Products table that lists the products that have come into the inventory. There is a field that denotes the day the product was introduced into the inventory. So ideally when the user creates a new record for the product, I would like this field to be populated automatically with the actual date that this filed was created by the user. Note that in future the user may edit the product (i.e other fields in this record), but the entry_date field should not be altered from what it was the first time is was created.
Is there a way I can do this? Any help much appreciated. thanks.
View 5 Replies
View Related
Apr 1, 2005
I have a problem that is probably very straightforward to you Access experts.
A brief description of the salient parts of my setup are given as numbered paras below.
1... I have 2 tables: Jobs and Sessions in a defined 1 to many relationship.
2... I have defined a form in parent-child format with the child (session) records displayed in single line (continuous) mode.
3... The above works as intended, ie as different jobs are selected (via combobox or bespoke navigation arrows), so the relevant session lines appear. I have removed both record selectors and default navigation buttons from both form and subform.
4... Because all but one (a simple text description) fields are auto or calculated, I do not want the user (Yes ... it's me ... but It could be someone else ... if I drop dead) to attempt to input via the form, since it causes problems for some of the calculated fields. :(
QUESTION A. How can I suppress the record entry part (bottom line) of my session one-liners subform? (The problem doesn't arise with the main job page-mode form, since the removal of the default navigation makes it impossible to add a job via the form).
QUESTION B. What code do I need to create a new session for a defined job via a simple dialog box or bespoke form which requires only two input parameters: jobname and sessiondescription. (All other fields are calculated automatically from today's date and jobname)
5... I currently perform input using the jobs table (ie selecting the relevant job), expanding the (sub)sessions table and then adding a session description ... but this is not so user-friendly!
I would appreciate any help and/or relevant comments.
View 3 Replies
View Related
May 1, 2005
Could anyone of you give me some sugguestions on designing a nice/efficent Data Entry interface (Form design) for adding new records?:
I have bound a Form with a table and linked all the textbox with the relevant fields in the table. I created a add new record button through the wizard provided by MS-Access as: DoCmd.GoToRecord,, acNewRec.
While, each time when I opened that Data Entry Interface, the current always pointed to the first one rather than leaving the blank field for data entry. Even I changed the value in those textbox, the system didn't create a new record in the table at all, only modifying the first record.
I know how to write the VBA code to open table and add new records by retrieving data from the Form interface, but I wonder whether there is more efficent solution by combining the default function/facilities from MS-Access itself and some VBA code. Also, it can have some validation before storing data into the tables.
Many Thanks
View 1 Replies
View Related
Nov 9, 2004
Hi All,
I am coding in VBA and use Microsoft Access as the front end.
My question is : I have a table(tblStudent) which has two fields Student Name and Gender.
I want to add multiple records in this table through a form at a button click....(Say I want to add least 5 students at a time)
So, I have 5 textboxes for student name, 5 textboxes for Gender and an Add button.
How do I so this programmatically?
Any help will be appreciated.
Thanks.
View 1 Replies
View Related
Oct 14, 2014
We have a table, JobRegister that people enter information on using a form, FrmOrderEntry
I would like to run a check when a serial number is entered in the field SerialNo to see if the same serial number exists where CompletionDate is null.
this would stop duplicate open orders being put on the system, or new orders being entered where the previous order hasn't been completed.
View 14 Replies
View Related
Nov 19, 2013
On a form to enter some new client info, I want users to be able to select their UserID from a combo box for future reference to other users (ie; Who made these notes?). For various reasons I want them to be able to add their UserID to the combo list for future selection if its not already on there.
There is a table set up for users, simply called tblUsers, with a single field, UserID. A query from this sorts the list alphabetically, and the combo uses this query to populate its list - qryUserID.
Users can currently select from a list or write their own UserID in the box, however when they write their own ID it doesn't get saved.
I don't need any message boxes or checking, just add it and move on kind of thing. It doesn't need to refresh the list immediately, as the user moves on swiftly once completing 2 more fields.
View 11 Replies
View Related
Jul 12, 2013
I have code that is executed with the click of a button to enter a new response using 2 fields to differentiate the records: a combobox "cboSrvID" and a textbox "RspnsName". I have a different set of questions for each value in the cboSrvID. Upon selecting my button the record is saved correctly although I would like it to open the blank form associated on the subform "sfrmSurveyResponses" when pushed. I have tried some DoCmd.FindRecord and DoCmd. GoTo functions to try and retrieve the last acLast RspnsID inputted. So far I have had no luck.
Below is the code for the onClick action of my button.
Code:
Private Sub cmdEnterResults_Click()
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.SetWarnings False
DoCmd.OpenQuery "qappNewResponses"
Me![sfrmResponses].Requery
End Sub
View 2 Replies
View Related
Oct 20, 2006
Hi, I have 7 tables in my database and 1 form corresponding to all the fields in these tables (linked by a query by recordsource). My problem is that the form will only show a record if ALL 7 tables have manually had the primary key entered (not good when i have information that needs to be added at different times). How can I make it such that if I create a new record on the form that all primary key fields will be updated, and this record will be present every time i open my the form??
Cheers
Tania :o
View 2 Replies
View Related
Sep 16, 2013
i have a database with a large number of records. Navigating through the records through a form one by one is a pain, so i want to create a text box where you can enter the ID number of the record, and whichever record has the matching ID number it changes to that specific record. I know that something like this is already apparent at the bottom of Access, but i want my user to do everything within the database itself, as all of the panes are removed whilst being used
View 11 Replies
View Related
Oct 21, 2012
I'm pretty new to making databases outside of a basic access class..Is it possible to make a record in one table that makes a new record in 5 different tables using different bits of the initial record?I want to use the data entered in an evaluation form to create a new entry with the basic identifying information in 4 different tables.
View 12 Replies
View Related
Feb 18, 2014
I have a form and was wondering if it was possible to set it so that a user is not able to click the submit [Submitcmd] unless certain text boxes are filled (however SampleOuttxt needs to be able to remain blank).
View 5 Replies
View Related
Aug 6, 2013
I've got a data entry form bound to one table. The form has four buttons:
- Clear Fields
- Cancel
- Save and exit
- Save and add another (which should save the user input to the subform/table, clear the input fields, and allow the user to add another record)
I can't quite seem to get the "Save and add another" button to work. When I put some information in the input fields and click the button, it saves it to the subform/table perfectly, but when I try to do it again, it just edits the last record (the one just created).
How can I get that button to place the information from the input fields in a new record every time?
The _Click event for the button looks like this:
Code:
If Len(Me.field1 & Me.field2 & Me.field3) > 0 Then
Me.Refresh
btnClear_Click
DoCmd.Save
End If
View 5 Replies
View Related
Oct 8, 2014
I have a main form with several tabs. One of the tabs is a subform with just one number control, driven by a select query. The control shows a number, and you can type in a new number, which then updates the field in the table.
BUT, the control then shows a zero, it has moved to a blank record. If you enter a number again, it will attempt to write it to a new record.
So how do I display the number, and allow a new number to be entered that will update the SAME record, and not moved to a new record?
View 1 Replies
View Related
Aug 15, 2015
I want to be able to pre-fill records with information based on a form every day for each client. This needs to display in a datasheet view showing all clients for each location.
Each day the subform needs to show the expected results of that day's activity with clients if all default conditions are met. (i.e. client receives a call that day based on expected conditions calculated in a form for that day).
View 3 Replies
View Related
Apr 12, 2013
Is it possible to have a 2 step confirmation process.
I have a yes/no control box to confirm that the record is OK or correct.
Is it possible to have a second process where by I can lock the record from erroneous data entry or editing? Like a "Post" in accounting.
View 3 Replies
View Related
Dec 6, 2012
I am building a database to capture monthly statistics on a number of items. I want to ensure that users don't enter statistics for the same item for the same reporting period. I found the following instruction, but can't make it work:
It suggests that I create multiple primary keys in the table
When I do it, it comes back with an error: Index or primary key cannot contain a null value.
View 6 Replies
View Related
Sep 2, 2013
I am trying to create a duplicate of a certain record in a table so that the user can then edit the new record - or old record even as it doesn't matter - as long as one of them is original. The idea is that any revisions / changes are stored the user may of made.
View 2 Replies
View Related
Sep 10, 2014
Is there a way to duplicate, triplicate, a record based on an option group selection. i.e.
Form
Field: Option group
Value = 1
Value = 2
Value = 3
Field 2:
Field 3:
Field 4:
and so on.
Basically if value 1 is selected, then I fill out the rest of the fields hit enter and go to a new record. But if value 2 or 3 is selected, I fill out the the fields, hit enter. The information is recorded said number of times based on the selection in the option group. Ideally I would have2 or 3 of the same record in the db, with different Primary keys of course.
View 3 Replies
View Related