Thanks for the fast reply NeoPa!
Thus far, I have built a simple login form which contains a text box for the user to enter a password, a text box which contains the password (and is hidden), and two buttons.
There's a Login button which makes sure that the entered password matches what's stored in the text box. If they match, it opens a form.
Then I have a button which opens the same form like this:
...
User Profile
Collapse
-
Simple login form w/ different permissions?
I'm trying to create a very simple login form. I need it to have a text box where a user can enter a password and login to the db. At which point, they'd have full access to read data, edit data, add new records, or delete old records.
Or, if a user does not know the password, they can press a button to login w/ read only rights (and thus not be able to edit any data).
I realize this isn't extremely secure but we need... -
How to change combobox query on click?
I have a combo box on a form (which is bound to tblEquipment table). The combobox is bound to tblIPAddressFK which is a number field linking to the primary key in tblIPAddress. The RowSource for this combo box is a simple query containing two fields, the PK and the IP Address (text). The purpose of this is to display the text IP address field, while being able to modify the FK in tblEquipment.
The problem I have is I need to view current... -
I figured it out! I needed to call sys_OrigUserID and not GetUserName.
Thanks again for your help.Leave a comment:
-
Thanks for the help! That does make it a lot easier.
I've added that function. Now I assume I need to call it from another control on the form. For test purposes, I've created a button and tried to call it in the OnClick property by typing Call GetUserName(). It is not working, I believe I am not including the correct arguments.
For now, if I could just get a msgBox that displays my username, that would be a good start...Leave a comment:
-
Auto log users in w/ AD credentials?
I'm trying to make it so that users are automatically logged in w/ their credentials from Active Directory. I already have an audit log which tracks the username of the person making changes. I want to do basically the same thing for db logon.
The main purpose for doing this (besides the fact that my boss said he wants it to have some kind of logon form) is to control who can edit the db, and now. I want to allow all my co-workers... -
Separate table for IP Addresses??
I've never used IP addresses in a database so this has me puzzled. I've done a lot of research and it seems there's many different ways to store IP addresses. Some actually store it as decimal, some as binary. I think my database project is not that large or complicated of a project, so I am planning on just storing IP addresses as text (i.e. 192.168.1.1/24) and require that data be entered in that format before it will write to the table.
... -
Not sure, but we might have a communication problem too. I'm not using the same control to select records and view records per se.
I have a unbound search form in the footer (which I realize wasn't in my first photo, my bad). This form filters the main form (bound cbo and txt boxes) and also filters the subform in the middle (which is a unbound subform in datasheet view.
The form in the header (what this thread is about)...Leave a comment:
-
Well im sure youve been doing this a lot longer than I have so I'm ears.
By separate control, do you mean I have a text box (likely locked) to display current values, and a combo box to change values? Not sure if I want to waste space on the form for that.
But if it'd cause too much headaches then I guess I'd have to.
How would it lead to confusion to have it as I've set it up?Leave a comment:
-
I figured it out. I needed to us the .controlsource property to unbind the control before saving the record, and then rebind them after saving the record.
I agree, I shouldn't be using bound controls. The problem was though, I wanted the combo box to display the current value.Leave a comment:
-
zmbd, it sorta is an attempt at splitform. Like a homemade splitform. Originally I tried using a splitform. I couldn't get the footer to show and it was really hard to make it look and function as I wanted it to, so I gave up.
I've attached the full form, as it is now in its nearly complete state.
The cbo and txt boxes on the top are used to add new records to tblEquipment and also to change records. I use the "Add...Leave a comment:
-
As for what I'm trying to achieve, I'm trying to create a way for us to change whether equipment is "Operationa l" (That is, installed in a cabinet which is located in a room which is located in a building) and therefore, has a hostname, IP address, CabinetFK, etc. Or, if its "In Storage", therefore uninstalled from a room and has no hostname, ip address, etc.
Using the form worked! I called a function which enabled...Leave a comment:
-
How to have bound form with bound combobox that doesn't update record?
Not sure whether this is a query problem or a problem with vba coding of form. I suspect its a VBA problem.
I've got a form I've been working on which tracks equipment and allows me to add new equipment and also make changes to existing equipment. The form is bound to a query which contains the main table tblEquipment where data is actually stored as well as several lookup tables.
On the form, I have a couple set of cascading... -
No need to apologize. You've been a big help. If you hadn't told me about IN () a few weeks ago, I'd of pulled my hair out.
I'll play with changing the form fields instead. I am having write conflict problems with the code as it is now, haven't troubleshooter enough to find out why but I suspect it might be to storage and the bound controls on the form.Leave a comment:
-
Eh. Sadly, I have one related problem.
If you can tell by my long and confusing code, if the user changes Equipment Status to "In Storage" it calls a function called toStorage which then uses a query which has Me.txtEquipment PK in its WHERE clause. Then all the records for that EquipmentPK in the disabled combo boxes and text boxes are deleted.
Problem is, if I disable the combo boxes and text boxes then it doesn't...Leave a comment:
-
Thanks for your help! AfterUpdate and Form_Current worked!
[IMGNOTHUMB]https://bytes.com/attachments/attachment/8541d1448067515/newequipmentfor m2.jpg[/IMGNOTHUMB]...Leave a comment:
-
Thanks for all the help guys! jforbes' method worked perfectly. I'll be using it for future forms as well.Leave a comment:
-
Thanks for the help. Its still not solved, not sure what I'm doing wrong.
I have tried using AfterUpdate as well.
I have a new thread here: https://bytes.com/topic/access/answe...ox#post3798647Leave a comment:
-
How to disable controls based on value of a combo box?
Per zmbd, I've started a new thread and am referencing this thread here: https://bytes.com/topic/access/answers/964884-if-statement-form-data-entry-property
I'm trying to make certain cbo and txt boxes be disabled (and/or locked) if cboEquipmentSta tus's Value is 2 and enabled if its value is 1. Or In Storage / Operational.
I have created a function and I'm calling that function in Form_Current as well as cboEquipmentSta tus_OnChange.... -
Thinking about this some more, I could use multiple msgboxes.
Like
The problem with that besides creating more code is that if 2-3 of the controls are blank then there would be 2-3 msgboxes. I only want one.Code:if isnull(cboEquipmentStatus) Then MsgBox "equipment status can't be blank." ElseIf ... modelnum.. then MsgBox "model number can't be blank."
I.e. if equipment...Leave a comment:
No activity results to display
Show More
Leave a comment: