Using Access 2007 DB windows 7..Main form on open of db collects the username from the environ. text Field(networkid) is populated on form from the function
1. On Open of DB it opens with a frmuserid which contains a text box holding the network ID which is derived from function fosusername()
2. The value of Forms!frmuserid!networkid (frmuserid! is the form that opens when the DB is 1st opened) is populated with the fosusername() in the networkid text box
I seem to only be having the issue of the db opeing with my network ID no matter who opens the db. Somehow I need to shut off that 1st ID when close db or update the form field on open.
I would like to put a text box (user) and checkbox (check100) on a form, that when the checkbox is not checked the value in Gender switches. In an AfterUpdate I would use a code to capture the user login.
Code: Private Sub Check100_AfterUpdate() Me.User = Environ("UserName") If Me.check100 = 0 AND Me.Gender.Value = "Male" THEN Me.Gender.Value = "Female" ElseIf Me.check100 = 0 AND Me.Gender.Value = "Female" Then Me.Gender.Value = "male" End If End Sub
My database has a front end that uses forms to allow the user to navigate within it, each year we create a new database which is based on the previous year's database but with all the variable information removed.
Within the database each form has a caption that starts with '2014-15' then goes on to say the form name.
Most of my forms also have a yellow background, (last year it was pink).
Both these areas were set up so that each year our users can distinguish between our databases, as they may have last years and this years open at the same time.
What I would like if possible is to know whether I can get a user to change both these things from within a form. So something along the lines of a button that when clicked would check all form captions and if within the caption it finds 2014-15 then change it to 2015-16 (or whatever the user specifies) but keep the rest of the caption. I would also want the same type of thing to happen with the colour so again within the background of the forms, if you find colour X then replace it with colour Y.
If this can't be done within a front end form, then could it be done behind the scenes, and if so how would I go about doing it?
I have a form in Access2000 with 5 text fields which get transferred to the table for each new record. Is there a way i can "LOCK" one field so that once the user has input that data it never changes until closed. I can already lock the field but once i create a new record the field then goes blank.
I have a new staff member in my office that has informed me that she has a degree of dyslexia. To assist her I've trialled changing the textboxes on one form in my Access 2013 application to a light pink color & this has instantly worked for her to read/input text.
Is there a way to automatically change each textbox to light pink on every form in my application on startup based on user login (say using an IIF statement in the OnLoad event of the startup form).
Wonder if you guys can help, I have searched the forums, but can't find an exact match to my query...
... i want my users to see a coloured image on their form to alert them to the status of a record in the database.
I have 3 very small bitmap images (named red, amber and green and stored directly next to my database ). I want to allow users to change which image should display on any given record by choosing either from a combo-box or radio buttons located next to the 'image space' on the same form. This image change will then save when the database is closed and remain until it is changed to another staus by a subsequent user at a later date.
Any ideas greatly appreciated (I'm currently at [I]'dimwit' level with coding)
So I have a login system established with loginID, passwords, and different user types. I also have a User Change Password form. However, this form only allows the user to change their password to something new. Also, for some reason the form only allows the first user in the table (ID#1) to be changed regardless of who is logged in. I was using an embedded Macro. I need to be able to have the old password entered and verified before the password can be changed to something new.
I have to change a group membership of one user in an multi user access database. As I see its no possibility to change it in the backend (in X.ldb file) nor in frontend.
Private Sub Command3_Click() If IsNull(Me.cboEmployee) Or Me.cboEmployee = "" Then MsgBox "You must enter a User Name.", vbOKOnly, "Required Data" Me.cboEmployee.SetFocus Exit Sub End If
I have a database that was created in Access 2003. I'm using this MDB in Access 2010.I need to change a user created menu. The update involves changing an existing entry and adding a new menu item. The menu looks like:
Project Time Entry Time Spread
I need the "Time Spread" to change to "Time Spread Daily" with a changed macro name. After that a new menu entry is "Time Spread Monthly". This menu will run a new macro that will display a form.I think the only way to do that in 2010 is to use VBA.
I've got a report that spits out a barcoded label for items on my inventory. What I'd like to know, is if there is a way in 2010 to allow the user to select where on the page for the label to print.
I found a way that looks like it worked for 2007, but it required enabling ADO, which I am not able to do on my work computer.
I've got a form (frmEdit) that allows users to search tblMain for records using a bunch of unbound controls and a dynamically created SQL statement. Search results are displayed in a subform (subMain), and the current record in the subform is displayed in a set of bound controls on frmEdit.
Now the important bit: There is a set of unbound checkboxes on my form that allow the user to change which fields are visible in subMain. This is accomplished by the following:
Code: Private Sub chkName_AfterUpdate() If Me.chkName = 0 Then Me.subMain.Form.CorrespondingField.ColumnHidden = True Else Me.subMain.Form.CorrespondingField.ColumnHidden = False End If End Sub
Certain fields are visible by default, but the user may want to change which fields those are. Here's what I've done so far to accomplish this:
Created a button (btnChangeDefaults) that opens a form (frmChangeDefaults)
Put checkboxes for each table field on frmChangeDefaults
Put a "Cancel" button (btnCancel)* and "Done" button (btnDone)** on frmChangeDefaults.
*btnCancel just closes frmChangeDefaults without making any changes to frmChangeDefaults or frmEdit
**btnDone changes Forms.frmEdit.Form.chkName.DefaultValue to Me.CorrespondingCheckBox.Value and then closes frmChangeDefaults
This all seems to work quite well, actually. Debugging confirms that the default values of the checkboxes on frmEdit are indeed changed when I click btnDone. But when I close frmEdit and re-open it, the default values return to what they were prior. This happens even when:
I close frmEdit using DoCmd.Close acForm, "frmEdit", acSaveYes
I close frmEdit after using DoCmd.Save acForm, "FrmEdit"
I save frmEdit manually by right-clicking and pressing save
I have a few tables, one of which stores a record of changes made to user accounts, and some of those changes are linked to a "multichange" table for when I have made the same change to multiple accounts.
What I am trying to do is select the change_id from my changes table, with a limit of 1 as I only want one result (it will always be the same) but I am using this query and getting a syntax error telling me I have a missing operator.
Code: SQL_SELECT = "SELECT change_id from dbo_user_change where username = '" & username & "' AND change_type = 'new account' LIMIT 1" Set qresults = CurrentDb.OpenRecordset(SQL_SELECT) Do While Not qresults.EOF multichange_id = qresults.Fields(1) qresults.MoveNext Loop qresults.Close
I have a standard form but i would like it so that when a user clicks on the button from the main menu to open the form it changes the default view which i have set to data entry and change it to not data entry. Also another button to change its record source to a different query. Rather than make lots of different forms that have the same thing but for just different purposes.
I am building a form in access and I am trying to find a way where user input isn't possible in the associated textbox when "No" from on option box is selected.
I am trying to change the button color on a subform if a related form data changes.Main form is products with a continuous subform with serial numbers of products i.e, serial number, location, price and a button to add addtional issues if there are any for this particular serial number (this will open up another form related to the serial number so I can add an issues if there are any).The reason I would like the button to be a different color is so I can quickly see if there are any additional notes been added to the serial number. Just in case you may ask why not add the field to the continuos form is that the issues and be quite lengthy and there may be lots of serial numbers on the form
I have been trying to create a login form that allows the user to change his/her temporary password logging it to the proper table along with timestamp and who done it info.But, after spending the morning trying to find the proper syntax I am flummoxed.
I can get everything to work accept the update of the fields. I can get the command to work (writes to the location) but it does the pop-up what is the parameter thing when it works. I have all the information just need to get it in so the command recognizes it.
DoCmd.SetWarnings False DoCmd.RunSQL "UPDATE lut_TeamList SET Pass = txt_Password.value WHERE TeamListID = Me.cbo_UserName.Value" DoCmd.RunSQL "UPDATE lut_TeamList SET UpdatedBy = Me.cbo_UserName.Value WHERE TeamListID = Me.cbo_UserName.Value" DoCmd.RunSQL "UPDATE lut_TeamList SET UpdatedWhen = Now() WHERE TeamListID = Me.cbo_UserName.Value DoCmd.SetWarnings True
i have a form that uses a text box to search through my bookings, and when the user double clicks on the record in the listbox it loads that record in my main booking form..
this works fine. the problem is this..
i will search and find a record using the text filter.. i will double click on the record and it loads in the booking form.
i then close the booking form, and the search form is still open in the background..
if i then click on another record in the search form, i get this message..
runtime error 3008, the table bookings is already opened exclusively by another user... etc
below is the code in my search form, is there anyway it can be edited to make sure this doesnt happen.
Option Compare Database Option Explicit
Private Sub QuickSearch_DblClick(Cancel As Integer) DoCmd.OpenForm "newBOOKINGS", , , "[bookingid] = " & Me![QuickSearch].Column(0) End Sub
Private Sub Search_Change() Dim vSearchString As String
DoCmd.Requery Me.RecordsetClone.FindFirst "[bookingid] = '" & Me![QuickSearch] & "'" If Not Me.RecordsetClone.NoMatch Then Me.Bookmark = Me.RecordsetClone.Bookmark Else MsgBox "Could not locate [" & Me![QuickSearch] & "]" End If
is there a way to find out who has a record open and send him message or someting similar?It happens from time to time that some one has a record open (selected in a form) and then is doing other things while the record is locked and a second person can't do nothing to the record.
In access database, Is there anyone know how use macro to open a word document on a share drive..(example S:safetyRegulation.doc)?.
Here is what I did and it doesn't work.. Runapp command line: C:Program FilesMicrosoftOfficeOfficeWINWORD.EXE //S:safetyRegulation.doc. Is there any easier way to do this? Please advice..thanks Rob..
I have a crosstab query. users need to run the query for any week of a year. It is always a YTD query. I have used this process on many select queries. Will a crosstab query not support this simple method? See attached screen shots.
I think my issue is that when the user opens my form a record gets created. Thus default value will not work. what happens is; the user fills out form 1 goes to form 2 and on form 2 i want a check box default value to be true...but its always false.
the checkbox in question is adequite staff. the user gets the question, "was there adequate staff" if there was the "adequate staff box" would be true. what i have tried is i created a "dummy" checkbox (checkbox299) entitle no. and labled adequite staff checkbox as yes. on the form2 open insert the following
Code: If Me.ADEQUATE_STAFF = False And Me.Check299 = False Then Me.ADEQUATE_STAFF = True Else End If