Forms :: Disabling Additions In A Form
Mar 22, 2013
I have a form which acts as a search function for users looking to amend existing records. This is based on a query, where users enter a parameter (PolicyNumber) and this returns only the records which match the PolicyNumber in a form view. I have also added basic navigation buttons to move between all records with the same policy number. I have a problem in that I can't disable the option to add a new record in this form once people navigate to the end of the records.
The user clicks a 'search' button, manually inputs the policy number, and the records are returned in form view. The code for the button is as follows:
Code : DoCmd.OpenForm "frmAdjustmentsEdit", acNormal, "qryPolicyNumberSearchWriteOff", "", acEdit, acNormal
How I can disable the addition of records in this? Also as a sidenote if no records are found I would like it to display a MsgBox, but despite trawling the internet have been unable to find a solution I could get to work.
View Replies
ADVERTISEMENT
Feb 14, 2014
I am trying to disable a field in a form based on a value in a field on a different table/form. I have been able, through simple VBA code, to disable fields based on a value in the same form. Are queries/sub forms the only way to go?
View 7 Replies
View Related
Jan 9, 2014
I have a mainform called frm_Main containing the field AgeCalc
I then have a a subform which has some tabs, one of those tabs contains a subform called frm_Bans.
If the AgeCalc field is <17 I want to disable the subform frm_Bans.
View 4 Replies
View Related
Jun 27, 2013
I am wanting to grey out/disable a field on a form based on entries in two other fields being the same. One of these fields that contains the data to be referenced in on a sub-form.The form is called 'Payment_Information-Form', the field to be greyed out/disabled is called 'SUF A Paid?'
The fields that are being referenced are: 'Set up fee in s (SUF) Recrt Restriction A <=' which is on the main form, and 'SUF_Letter' which is on a sub-form (within the main form). The sub-form is called 'Costings_11_Previously_Paid_SUF subform'.If 'Set up fee in s (SUF) Recrt Restriction A <=' equals 'SUF_Letter' then grey out.I tried the following formula in both the On Current and After Update sections but it hasn't work.
=IIf([Forms]![Payment_Information-Form]![Costings_11_Previously_Paid_SUF subform].[Form]![SUF_Letter]=[Set up fee in s (SUF) Recrt Restriction A <=],[SUF A Paid?].[Visible]=True,[SUF A Paid?].[Visible]=False)
View 4 Replies
View Related
Nov 18, 2006
Hi All,
I have been searching and can't seem to find how to solve my problem. I have a sub form that allows adding new rows to a database. The detail contains a combobox and a few text fields. When I enter data everything works fine. However when I accidently tab into the next row (new blank row) and then try to get out of the form without adding a new row I get an error about "Index or Primary Key cannot be null" or something like that.
It is very frustrating because I can't exit the form until I add data to the new row and then leave without tabbing to much (thus creating another new row with no data).
How do I trap the new row and only allow the insert if it has data in it?
Thanks.
View 1 Replies
View Related
Nov 9, 2012
While I was trying to test one of my forms (which was NOT working and I had to totally redesign it), I somehow created a bunch of stores in my Store Information table...some with no names, some with the first letter of an existing store, and there was even a duplicate of the store which is creating a problem now because some products exist in Store 1A and others exist in Store 1B.
I've created a query to identify the wayward products and am changing those. I'll delete that store then.
My issue is...can I set it so that the ONLY place a new store can be created is in the Store Information Input form? That if someone makes a typo when entering products, it doesn't create a new store?
Access 2010
View 2 Replies
View Related
Jan 16, 2015
I know some basic code to disable a control after updating but, I have 20 or so controls that I want that to happen to as the record is updated over time. Is there a way to group all those controls and have them evaluated after going dirty instead of having to code each control?
View 4 Replies
View Related
Jul 26, 2005
I would like to be able to disable 2 other fields on a form if a user selects a certain item from a drop down list on that same form....????
ANY HELP
View 3 Replies
View Related
Jan 23, 2015
I am creating a form and I have some fields I don't want people being able to change so I selected to disable them in the datasheet but now the labels have a strange double text, it looks different than all the other labels and is driving me nuts. when I enable it the font on the label goes back to what the others are but once I change it to disabled it goes funky again. how do I fix this?
View 4 Replies
View Related
Aug 10, 2005
My database has a form with a combo box where the user can select whether the record displayed is "Current", "Sold", or "Withdrawn". I would like to set up the form so that when the user selects "Sold" or "Withdrawn" from the combo box, all other controls on the form are locked and disabled (ie. can't be changed).
What's the best way to do this?
View 4 Replies
View Related
Sep 24, 2006
Hopefully someone can point me in the right direction.
I have a small spare parts db which also has pictures of some of the parts.
manufacturer
partnumber
wholesale
retail
picture
The form carries data on wholesale price which I would need to hide if the customer would like to see a picture of the required spare part.
Is it possible to have a button to temporary make the wholesale field non-visible? Or would it be better to click on a button to open a new page with just the picture of the selected part and the retail price, if so what is the best way to achieve this.
Thank you in advance for any assistance.
Kim
View 1 Replies
View Related
Dec 21, 2006
I have a form which I want to disable the close button. On the properties of the form I set Close Button option to 'NO'. When I open the form the form close button is disable, but as soon as I maximse this screen, the close button becomes enabled again. Any Ideas as to why this is happening and how I can disable this button comlpetely on this form?
View 2 Replies
View Related
Dec 19, 2013
Is there a way to disable my print report button if the user has not hit the save button ???? and maybe display a msg box?
attached a snippit of my form.
View 5 Replies
View Related
Mar 4, 2014
Basically I have a continuous form with each record having a textbox and a checkbox. There can only be one checkbox ticked per record but what I want to do is to stop the other checkboxes from being ticked if one is already ticked.
View 2 Replies
View Related
Jul 14, 2014
I have a problem with formating controls in a form. As a example, I inserted a tree view control and adobe reader control. After I've resized them manually in a design form, I switch into form view and they both resize automatically to their own size (don't know where it gets from).
In the result, I can't obtain the required width and height. How can I make them resizable to my own preference?
View 14 Replies
View Related
Sep 9, 2013
How to disable fields in Access based on data entered in a previous field? For example if "yes" is chosen from a drop down show "Date field" if "no" is chose hide "Date Field".
View 2 Replies
View Related
Aug 11, 2005
Hello, All.
I have a table that collects training information for our company. Some training is limited to one or two employees and that is easily entered by using a form linked to the table. However, some training is mandatory, company-wide training that all employees must attend. How can I add a record for each employee reflecting this training most efficiently? Is there a way to do a mass update?
Thanks.
View 3 Replies
View Related
Aug 22, 2007
I'm a self confessed newb and need help
Bascially trying to get 2 table entries to add together, now I get the 2 fields to view in the 1 entry I want them into but not as an addition
For instance
strPacket24 might have a value of 1726
strPacket48 might have a value of 1725
Total should equal 3451
Problem is in the total field I get the following displaying
String I have tried using is
=Nz([strPacket24])+Nz([strPacket48])
- this displays 17261725
=Sum(Nz([strPacket24])+Nz([strPacket48]))
- this displays 18592300 ??
Can anyone help me out please?
View 2 Replies
View Related
May 17, 2005
I'm not sure if there is an easy way to do this...... Maybe someone has run into this problem. Have a DB.....Did a split...BE is on the server "F" drive.. fe is on stations. I retained a full copy of the DB NOT split. I still wanted to expand it. So now I have problems by working this way..I have not altered the tables that are on the "F" drive.. But I have added more tables to my unplit version. I need to copy the tables and info from the BE on the server BACK to my full DB. Then split it again. IS there an easier way???????????
Thanks
View 1 Replies
View Related
Jul 2, 2007
I'm an Access idiot - please be kind :o
I made a little Access app for a friend, to do his invoices. Access wouldn't allow me to copy the db to a CD, but advised me to convert it to a Master. I followed all the instructions (honest!). Afterwards, I could burn his db to a CD and, on his computer, it opened but wouldn't allow edits or new records - not terribly helpful for an invoicing program :eek:
Since then I've tried creating a new admin in his name, re-setting all permissions, blah blah ... Basically, it looks like there is loads of help on securing a database but very little on un-securing it enough to be transferred to another PC!
The dang thing persists in allowing everything except edits & additions :confused:
I can't find out how to convert it back from a Master to ... what, a slave? :p
Even so, that wouldn't be the answer coz I'd be back at square1.
I use a PC running XP and Office 2003. My invoice-less friend has a PC with Win[NT]2000 and Office 2000. I converted the database to Access 2000. I am way out my depth here, but hoping you Access swimmers will be able to advise :cool:
View 1 Replies
View Related
Aug 1, 2006
I want to have a dropdown box in a form but allow additions to be made, but after they are made, instead of them not showing up in the box like usual, I want them to become a part of the list. Plz help! Thanks
View 9 Replies
View Related
Dec 5, 2007
I'm trying to add records to a junction table based on additional record added to one table via form in the many to many relationship.
Junction table = ClientAssociation
Main table = ClientMain (qry_NewClientNullAssociation identifies new record added)
Many to many table = Associations
I'm trying to do this upon clicking a command button that then opens ClientAssociation based on Client_ID. Then allows user to select mutliple associations (Asoc_ID) for Client_ID.
Here's what I have - I'm new at this...
Private Sub ClickAssociations_Click()
On Error GoTo Err_ClickAssociations_Click
'Open recordset with new client records
Dim db As Database
Set db = CurrentDb
Dim recClient As DAO.Recordset
Dim strClientID As String
Set recClient = db.OpenRecordset("qry_NewClientNullAssociation", dbOpenDynaset)
'Loop through new client ids
Do While Not recClient.EOF
strClientID = ClientMain.Client_ID
Dim recAsoc As DAO.Recordset
Dim strAsocID As String
Set recAsoc = db.OpenRecordset("Association", dbOpenDynaset)
'Loop through asoc ids
Do While Not recAsoc.EOF
strAsocID = Asoc_ID
'Open junction table and update records
Dim recClientAsoc As DAO.Recordset
Set recClientAsoc = db.OpenRecordset("ClientAssociation", dbOpenDynaset)
With recClientAsoc
.AddNew
!Client_ID = strClientID
!Asoc_ID = strAsocID
!CheckBox = False
.Update
End With
recAsoc.MoveNext
Loop
recClient.MoveNext
Loop
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_Associations2"
stLinkCriteria = "[Client_ID]=" & Me![Client_ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_ClickAssociations_Click:
Exit Sub
Err_ClickAssociations_Click:
MsgBox Err.Description
Resume Exit_ClickAssociations_Click
End Sub
View 1 Replies
View Related
Apr 2, 2006
hi,
can anyone tell me how to stop additions and edits on a particular record in a form, plus the subform that the main form contains,
im trying to put the event behind the change of a text box, shipped date, so when its changed you cant add or edit the record which is the order.
cant anyone point me in the right direction?
cheers
View 1 Replies
View Related
Sep 27, 2012
I've got a database that allows all users to review an address register. If they find errors or mostly get updated information they have another form they can fill out to make the recommended changes. Only I have access to the main DB to make the change permanent.
The question I have is there a way for Access to send me a notification that someone has requested the change?
I know that sending an email is doable - in Access. However, that's not an option for our network here. I was thinking something along the command prompt "Net Send" command. However I've not been able to get that to work by itself - let alone within Access...
I have used VB code in the past to store what PC is using the database, I could modify that to alert me whenever I open the DB up from my PC. But I was trying to get away from having to open this particular DB up every day and check for changes.
View 2 Replies
View Related
Mar 2, 2008
How can i disable the naviation i get on my form?
i have a form to add new records, if i accidently scroll the mouse i get previous records shown in the feild, so is it possible to disable the function?
View 3 Replies
View Related
Mar 10, 2005
Working in the theatreworld, I'm trying to create something which will usefully combine my contacts and also a database of which shows we have done (dates, actors involved etc, etc) and what shows we have bought in.
So far, I have created my form which has the usual fields (name, address and so on) and also a field which asks users to describe what type of contact they are ie. are they an actor, or a director, or a theatre company.
There are also two command buttons, which will either open up another form which lists all the productions they have been in with us over the years (In-house productions), or one that opens up another form which lists what shows each theatre company has brought to us.
I would like to be able to select 'actor' in the category field which will then enable the command button for me to see what productions that person has been in. Or if I selected the 'theatre company' category then the other button becomes enabled.
Can anybody advise me on this please? Alternatively, if this all sounds far too convoluted, then I am open to suggestions!
Many thanks in advance,
Popps
View 1 Replies
View Related