YES that solved it!!
I changed the PK in all four tables to the same name ExemptionID and now it delete rows if I change to a new value.
BIG THANKS TO YOU ALL!!!
Just though of this,
PK in tblExemption is called ExemptionID and FK in the other tables are called [tblExemptionAccount].[ExemptionAccountID], [tblExemptionFirewall].[ExemptionFirewallID] and [tblRemoteAccess].[ExemptionRemoteAccessID]. For your code to work does all fields have to be named...
Hi,
The field is/was called ExemptionID (without space). Have also chanegd name on table ExemptionAccount and ExemptionFirewall to tblExemption...... to make it more concistent.
This is how the code looks now:
Private Sub cmbExemptionType_AfterUpdate()
Dim newType As String
Dim id As...
I changed it and now I get a different error message.
"Run-time error '3061'
Too few parameters. Expected 1."
And it stops at "CurrentDb.Execute strsql" under Account Case.
Msg Value was:
ID = 4
NewType = Account
strwhere = Exemption ID = 4
There is a one to many relationship between Exemption (many) and ExemptionType (one) and both tables are linked by a ExemptionTypeID.
The actual value is stored in the ExemptionType field (column two in ExemtionType table).
Could this problem be related to that the control source of the...
Made a few changes to the code and now I get a different error.
Compile error:
Method or data member not found
New code
------------------------------
Private Sub cmbExemptionType_AfterUpdate()
Dim oldType As String
Dim newType As String
Dim id As Long
Dim strWhere As String
Dim...
Yes exemption can only be of one kind and it is decided based on a combobox called ExemptionTypeID and it is a separate table ExemptionType. The type shouldn't change but I want to prevent someone from creating Account, Firewall and Remote Access exemptions linked to the same Exemption ID as it...
Think this is solved now.
Have one table called tblFirewallProtocol and one called junGroupFirewallProtocol.
Both fields in junGroupFirewallProtocoll have relation with PK in tblFirewallProtocol.
Big thanks to all of you helping me with this problem.
This is a whole new workd to me so thanks for taking your time with me!
This is a database for manage security exemptions and there are different type of exemptions which require different type of information, there is also some information that is requireed for all types of exemptions.
Common...
Thanks,
Would this code only replace fuctions equal to my current code or will it also take care of the problem with deleting text in subform if the value is changed?
Regards,
Yes a group protocol is just a list or a group of protocols.
But since a protocol could be a member of several groups I guess I need to use a juntion table?
I made a few chaneges and this is how it looks now,
tblFirewallProtocol
FirewallProtocolID - PK
ProtocolName...
Hi,
The main form in my ExemptionDB contains three subforms which are controled by a drop-down list called ExemptionType.
Each subform relate to individual tables ExemptionAccount, ExemptionFirewall and tblExemptionRemoteAccess. And each of the three tables have a one-to-one relationship...
Hi,
Yes a protocol can be a "member" of several groups so I guess a junction table is needed.
Think I understand how to design my tables now just have to figure out how to design my for after this new setup. Will come back with further questions if I run into proble.
Will also take a look at...
Went back and checked my relations and now I see it automatically created a second employee table and I can now check this "Enforce Referantial Integrity".
Is this second employee table just a virtual table because I can't see it in the list of all tables on the left side of access?
Regards,
Read the link you posted but think that is over my head so I changed it to a copy insted of a link to Outlook and it is running much smoother.
Regarding having two links between Employee table (the new copy from Outlook) and my Exemption table it now looks like this
Employee
EmployeeID (Yes...
Thanks,
A related problem (not sure if I should create a new post) is that it is running so slow and I'm not sure if my Global Address Book it to big for Access to manage or if I can make it run fatster.
My Global Address Book contains about ~70.000 entries so I created a query which filter it...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.