Modules & VBA :: Datasheet Mode Form For Both Data Entry And Data Retrieval
Feb 9, 2015
I want to use the same form in datasheet mode for data entry and retrieval. When retrieving, all controls are disabled and locked. I am trying to enable and unlock them for modifying but that isn't working.
<code>
DoCmd.OpenForm "PO_Practice Data", , , , acFormEdit, acHidden
Forms![PO_Practice Data]!PO_Name.Enabled = True
Forms![PO_Practice Data]!PO_Name.Locked = False
Forms![PO_Practice Data]!Practice_Name.Enabled = True
Forms![PO_Practice Data]!Practice_Name.Locked = False
[code]...
View Replies
ADVERTISEMENT
Feb 4, 2014
I have several comboboxes in my database from which users select values. However, in most cases, I do want to give them the option to add an item that does not appear while simultaneously updating the underlying table which stores those dropdown values. I have made use of the builtin "allow edit list items" feature of Access 2007 but the form always opens on the first record of the form on which they are to add the new item. Is there a way to specify that it should open in Data Entry view apart from using VBA?
View 4 Replies
View Related
May 14, 2013
I have a form containing a subform. The subform is opened in data entry mode, so it displays no existing records. However if the user right-clicks the form and selects a sort, all records are displayed. Is there any way to stop this behavior so that the form remains in data entry mode?
View 5 Replies
View Related
Feb 3, 2015
I created a form to enter the lookup data and build the SQL string to create a recordset in VBA that is a subset of the original data. Using the Form wizard I created a form that displays ALL of the records in that original table (actually a QUERY). What I want to do is open this second form but have it reference the recordset I built in VBA.
View 1 Replies
View Related
Jul 6, 2006
I have a subform that I would like to have people use for data entry. It's in a data sheet view and sorts by date (the most current date at the top).
This works fine -- when there are only a few entries. But as time goes on and the list grows, it means the users will have to scroll to the bottom to get to their data entry field. Yes, I know they can use the record selector, but I want to make it easy and intuitive as the users of this data base have very little formal training and aren't very computer savvy.
I'd like for them to go to the form, and just start typing the new info in the top line. Is there a way to make the "new" line appear at the top of a datasheet?
Thanks all of you for your help on this forum!
View 14 Replies
View Related
Aug 31, 2014
I have an entry Form which is used to record prospective new members of a society in a Table named 'Foreigners' in a Membership Database using Access 2010. The entry form also records the name of the 'Interest Group' to which the prospective member is initially affiliated.
On entering this Group Name, selected from a drop down list from the Groups Table, The Group ID & Leader Member ID are automatically recorded.
However, I don't wish to record the Leader Member ID, what I wish to record is the Leader's Member Name which is identified by that ID in the related 'Mail List' Table.
In the Properties sheet the relevant source for this field is shown as Leader, but what is displayed is the Leader ID...
View 5 Replies
View Related
Dec 6, 2014
I have a primary school database. I'm trying to create a form that allows a teacher to select their class, then select a subject and then be presented with a data entry form in a table layout that lists only their student's names in one column and an empty column to input results for the selected subject.
To simplify my explanation to just three tables, lets say my tables are:
> Students....which stores student names plus a foreign key for their class
> Classes...which stores the class name
> Results...which stores all the results (fields are: ResultID (key), StudentID, SubjectID, Result, DateofResult)
I have no problems creating reports where the teacher selects their class from a combo box to generate a report based on a crosstab query. But this one has me stumped.
View 2 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
Mar 8, 2015
I have an Undo button : [btnUndo] and would like it hidden until someone starts to enter data, where it will become visible...
what code would I use? and where would
Code:
me.btnUndo.visible = true
be triggered?
View 3 Replies
View Related
Dec 14, 2014
I have a form for entry and some fields are computed or result of a query from another table. I have a function that looks up a value from another table like so
************************************************** ********
Public Function GetTargetType() As Variant
GetTargetType = DLookup("type", "tblFormulations", "[tblFormulations!formulation]=Forms![frmNmsConsumptionEntry]![formulation]")
End Function
************************************************** ********
Which works fine when I test in the immediate window.Then I have this form event. This however does not insert this value when I am adding records using my continuous form.
************************************************** ********
Private Sub Form_BeforeInsert(Cancel As Integer)
Me!target_group = GetTargetType()
'Forms!frmNmsConsumptionEntry!target_group = GetTargetType()
'[tblNmsConsumption.target_group] = GetTargetType()
End Sub
************************************************** ********
making sure I can insert this value once retrieved.
View 7 Replies
View Related
Dec 2, 2013
I have a Form to Display Projects that has a SubForm displaying Sub-Projects related to them. The main Project Form has a Combo Box which allows a user to select a ProjectID to display. The SubForm has a ProjectID Field as well. When the Project ID is selected in the Main Form, only the appropriate Sub-Projects are displayed in the Sub-Form.
On the SubForm, there is a Field named ActionID, which uses the following VB Code to limit the availability of the Fields in the SubForm that apply to Dates. If the selected Action is Install, only Install related Dates should be available. Likewise, if the selected Action is Remove only Remove related Dates should be available.
Code:
If Me.ActionID.Column(1) = "Install" Then
Me.AssetInstallMonth.Enabled = True
Me.AssetInstallYear.Enabled = True
Me.AssetRemovalYear.Enabled = False
Me.AssetInstallMonth.Locked = False
[Code] ....
Everything seems to work as expected until there is more than one Sub-Project is the SubForm and they do not contain the same Action. In these cases, it appears as if the Sub-Projects in the SubForm are not being treated as individual records. If Sub-Project is Added or Modified to have an action of "Install", all records are treated as Install Records (only Install related Dates are available), regardless of their content.
Is there a way to update the properties for only the row that has been selected?
View 5 Replies
View Related
Mar 5, 2015
I an trying to create a data entry form (IndividualsEntryFm) to input data for fields such as (First Name),(Birthdate) etc., these to be saved to the (IndividualsTbl)
I also have another table (NamesTbl) which has family names etc. The two tables are linked by a (MainID) field. I want a combo box on the individualsEntryFm so that I can select the family name. Then I wish the empty fields for the IndividualsTbl to be available to enter data.When I press the save button I then want this data saved, together with the MainID from the combo box to the IndividualsTbl.
I have set the IndividualsTbl with a (PersonID) field as an auto number each individual therefore has a unique PersonID but may well share the MainID. I'm trying to link many people to the same address.
View 1 Replies
View Related
Dec 18, 2014
I am trying to save specific data from a data entry form to a specific depending on what the user selects from a dropdown/combo box.
So if the user selects "test company from the combo box, that data (from that form) will save to the Test company data table.
View 5 Replies
View Related
Jan 30, 2006
Hi,
Can someone please help. I am required to bring back a ranadom 10% of data where the [Total_Cost] field is less than £500.
Can this be done in one query? I have to use Access97 becuase this is the lowest Office Version we support.
:confused: .
View 1 Replies
View Related
Feb 18, 2015
My aim is to have my forms open to a new record, which I have done, but if my users need to then update or edit data in previous entries, they can click a button that allows this.
My thoughts were to add a button, then put in code so that the necessary properties changed the form from displaying a new record or records entered since opening it, to showing all records in the associated table....
As an example there is a table for purchase orders. When clicking on this from the main menu form, it opens up the purchase order form to create a brand new PO. At times though, we will need to revisit an order to attach a copy of an invoice, or update the cost of whatever was purchased.
View 5 Replies
View Related
Sep 28, 2014
My db has multiple linked tables. As time passes and work on a project continues data needs to be added to a separate table that is linked to the first table to be populated.
i.e., Initial design data is entered first, when drilling is complete more data is added to a linked table, when drilling is surveyed yet more data is added to the second table.
What I want to be able to do is to query for a particular set of existing design data, display this on a form and on the same line enable data entry to other fields from other tables which are linked to the existing design data.
View 7 Replies
View Related
Jun 20, 2015
How to open a pre filled excel template in read and write mode from msaccess vba and insert data from msaccess tables into specific columns in excel.
Rename the tabs in excel sheet based on a specific column in the access data.
Each row in the table will go to a seperate tab in excel.
Save the excel template after populating the necessary data into different tabs.
View 3 Replies
View Related
Jun 10, 2006
I have a form designed in DS mode. If I open it directly (double click on it on the Panel), it works fine
When opening it programmatically (from a button in another form) it shows just ONE record, in spite of having room enough for several records.
May I get some help to check what am I doing wrong?
thanks
View 2 Replies
View Related
Jul 6, 2005
This has most definitely been asked before but I really cant find anything on the forum! Ive created a data entry form which has a save button which the user must click each time to save the record. However how do I refresh the form i.e. empty all data from the previous record without exiting the form. Ive tried to combine the undo macro but that simply deletes the previous record. Any help please!!!
View 3 Replies
View Related
May 5, 2006
My form is in datasheet mode.
One of the textbox is called txtHours
When I access the form the column caption is "txtHours" !
As you can expect it looks ugly.
So to get a decent caption like "Hours" I am forced to set my textbox name to "Hours" !
As you can expect it goes against my coding standard to do that.
Beside I want the caption of some textboxes to include some non-standard letters such as `é' è' '!' ' ' etc. and if I put those in the textbox name it ruins the visual basic code !
View 2 Replies
View Related
Oct 1, 2013
I am making a database, where 10 to 20 users will be entering data. I have queries
1. I am planning to create a form with which user will be directly entering in the table, will that b right?
2. If 2 or more users will open form its own side does they all will be entering in same row number?
3. What will be the best of these, by insert query or directly to form?
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
Jul 23, 2014
I need to alert the user of the database in case he/she enters a record that already exists in the database. If a person enters a key type and a serial number combination that already exists in the system and has status "issued", I need a pop up message to show up.
Am I missing some quotation marks somewhere in that DCount?
Private Sub SerialNumber_AfterUpdate()
If DCount("*", "tblIssuedKeys", "KeyType = '" & Me.KeyType & "' And "Status = 'Issued'" And SerialNumber = '" & Me.SerialNumber & "'") > 0 Then
MsgBox "This key has already been issued"
Cancel = True
End If
End Sub
View 2 Replies
View Related
Oct 28, 2013
I have made a database for data entry, currently i have a challenge of getting it update and navigate.
On the form if the staff name is xyz it should only shows the records filled by xyz in form and navigate that records only. I am attaching the data base also....
View 3 Replies
View Related
Oct 24, 2013
I am trying to write code for a form. When the user enters the "Number of Payments" and the "1st payment date" it will fill the amount of the payment into a specific month.
For example: 1st payment date would be 10/24 the payments would be bi-weekly and the amount would be $50.00. The number of payments would be 4. I would need it to put $50.00 into a field called "October" $100.00 into a field called "November" and $50.00 into a field called "December". In excel I would do this simply by using a (date)+14 formula. I am sure that I need to do this with loops but where to even begin.
View 1 Replies
View Related
Feb 13, 2015
How do I display a more meaningful message instead of the cryptic error about having to enter data into blah blah blah. How can I trap that error and provide them a more meaningful message about entering data. I have tried the following;
Main form name frmPatientRecords
Sub form name DentalRecords Subform
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Nz(tblPatientDetails!recordid, 0) = 0 Then
MsgBox ("sorry. Please complete the main record entry")
Parent.SetFocus
End If
End Sub
View 14 Replies
View Related