I have not done much work in later version of Access. Now I found if I change a design in one form and similar forms (names are different) which are linked to the same tables got changed as well without openning them up and making changes. Is this something new with Access 2003?
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
What I want to do is following. In form ASSIGN(fields are takedate and inout) ,if TAKEDATE is different then 0 then set value of inout field to 1 My VBA knowledge is poor cause i dont think this should be hard
In the form that I am working on, I have a number of text boxes that are filled with a query telling me which people are scheduled to work a shift. I also have a text box (I may need to make this a sub form, but would prefer not) where I want a list of all available employees for the specific shift to show. When I click, I want to see the list, so that I can make changes if needed and only chose those employees that are available for the shift.
I have: Private Sub Ctl8a_4pb_Click() Me!txtAvailEmployees = "SELECT tblAvailabilities.Date, [First]+" "+[Last] AS [Full Name] FROM tblAvailabilities INNER JOIN tblStaff ON tblAvailabilities.EmployeeNum = tblStaff.EmployeeID GROUP BY tblAvailabilities.Date, [First]+" "+[Last], tblAvailabilities.Shift1 HAVING (((tblAvailabilities.Shift1)=-1)) WHERE tblAvailabilities.Date=[form]![frmScheduleEdit]![CalDate];" End Sub
I get a syntax error. Is is even possible to pass SQL in a manner as this? If it is, where would I be messing up?
I have a field (AR#) that has an "on change" event. This is supposed to check through the database and see if that number has been here before (it's like a job # / serial #). It had always worked fine - now suddenly this field, and this field only, reacts VERY, VERY slowly when you type a number in. You can type the number and wait about 5 seconds for it to show up. When I removed the event - it acted normally so I think it has to do with that. Here's the vb for the event:
Private Sub AR__Change() Dim db As Database Dim Rst As DAO.Recordset Dim strAR As String Set db = CurrentDb() strAR = Me.AR_.Text Set Rst = db.OpenRecordset("repairs", dbOpenDynaset) Rst.FindFirst "[AR#] = '" & strAR & "'" If Rst.NoMatch Then Else MsgBox ("This value it is already in the system !") End If End Sub
Any ideas why it's reacting so slow or what I should look for?
Ok... we're looking to take some values from our current form (hence the first 4 lines) and put them into some form elements on the new form... the form opens (the OpenForm command's going through), but when we reach the last line we get a "cannot find form XXX" error... so how do we change the elements on the new form?
A couple of days ago I was looking to change a form button color in a new database I was working on, I could not. I changed the Back Color to #22B14C but it stayed the same grey color. I could not make the change in that form in that database.
Then I went into a different database that I built and I noticed that the Command Buttons within the form was blue, I changed it to #22B14C and it turned green. What the difference is. I copied the button to the first stated database and in that form and the color stayed to grey even though the Back Color was set at #22B14C. I noticed that the database that the form that I could change the color had Hover and Press color options whereas the first database does not. I copied the form that I could change the button colors to the first database and I could change the colors but they had changed from the second database to the first, I could change the colors but the Hover and Press options were gone.
how I get the first form to change colors and what is the difference between the two databases?
I have a main form that has 10 sub forms Each sub form’s record source is link to a different Query.
It takes more then a minute to open the form, (because it’s running the query for all sub forms). So I changed the sub forms source to SELECT * FROM tblTest WHERE false;
I also changed the main form. When the button on the main form is clicked, it’s adding the following:
Me.SubMySub.Form.RecordSource = "select * from qMyQuery" Me. SubMySub.Form.Requery
However, after I close the main form, the sub form’s record source stays linked to SELECT * FROM qMyQuery;
And will take the same long time again to open the main 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)
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 have another question about ACCESS forms. With VBA, I want to change the record showing when I open a form. I see there is a member "CurrentRecord" so I tried in the class module
Me.CurrentRecord = 2
I compiles but gives runtime error that is write-protected and cannot be changed. In the ACCESS help I read you could do it but HOW?
What should I do ( I am using ACCESS 97 ) ?!
Thanks in advance
Victor
PS : Is it true that VBA in newer versions of ACCESS has more features/functions etc?
I want to write Visual Basic language in the form with one button:
I have one form named "setForm" with one button and one text box: Let's set the new table "frm2", the new form "frm2"
Dim sql As String sql = "SELECT [model].* INTO frm2 FROM [model]" CurrentDb.Execute sql DoCmd.CopyObject CurrentDb.Name, "frm2", acForm, "frm1" Forms!frm2.RecordSource = "frm2"
The last statement code doesn't work: It is said that Microsoft Access cannot find the form "frm2" referred to in a macro expression or visual basic code.
I've been working on a database for quite a while now, and i've now given it out for testing, and i've come across a little problem. One of the users is colour blind, and the colour theme i've used throughout this database is causing him problems.
I have a function that can single him out when he logs in, question is, is there a way i can change the font colour for the whole database in one go through code??
I have around 12 forms with many controls and labels, i'm kind of hoping i don't have to name each control and label separately to change the font colour.
Please tell me that there’s some clever piece of code that can change the font colour on a form in one hit…..
My client has a system whereby those employees who are off for extended periods of time (sick, Workmens Comp maternity etc) are re-assigned to a different division.
The table PERSONNEL contains all of the information for each employee. When someone in the sales division (for example) goes off long term ill their data is entered into table LTILL. Their info still remains in PERSONNEL as it is expected they will return at some point.
When I enter their data into LTILL, I would like to change thier division in PERSONNEL from sales to LTILL at the same time.
What would be the best way to go about this. The LTILL has no primary key. The obvious choice EMPLOYEENO is no good since a person my be transferred to LTILL more than once during their career.
what's it? I want to open the same form with different buttons (cos different criteria are attached to those buttons). When i click i want the background to change based on the button.
So im asking for just one line of code: What's the vba to change background property of a form dynamically. cna't seem to find it :o
So i have a field called [LastUpdate] that i want to have change to the current date to show when the form was last updated. which event do i use to make this happen and should this be a form event or this field event? I tried using the On Data Change even for the form and then just assigning [LastUpdate] = Date, but that didn't do anything. any ideas?
Is the a way of changing the fields selected in a query by a form.
I have a form showing how many people need to do each module. Each textbox is populuted by a count from the table.
The idea is simply to avoid having 26 queries based on each module. Is there a way to have the field name changed via the form.
I have used the on dbl click event to pass the field name to a hidden field on the record. I just need to pass the data in the hidden field to the select query.
I'm a new Access user and i couldn't figured out how to implement the following:
- I've got a form with buttons on it. These buttons refer to different querries which either displays or changes specific data on the predefined table.
- With a text box (or another thing) I want the user to enter a table name, so that the querries gain portability to work table-independent.
Briefly this is what i want;
-- User should enter a text -- This text should be used to change the TABLENAME in each of the querry
But I don't know how :(
Is there anyone who has time to explain this implementation in detail??
But I don't know what to put for an expression. I would like to use the same form but base the RecordSource on a query called "Receiving Search by Date". :eek:
I have a form based on a query, I would like to add additional criteria to the query dependant on the status of a check box. Is this possible if so what would the code look like?
I browsed a lot of posts related to fonts, and pored over my "Mastering Access 2000" and "Access 2000 Power Programming" books, but I couldn't find answers to my specific questions.
I have many years of experience with Access, but I've only recently become interested in making my forms look nice on a variety of user PC configurations. Now, like many others, I sometimes spend too much time formatting a form so it looks really nice on my PC, only to find formatting problems on the user's PC. For example, a label using Arial Rounded MT Bold looks great on my PC but is cut off on the user's PC. Similarly, Tahoma on buttons looks nice on my PC but looks bigger and bolder on the user's PC.
At first I thought this was probably a font problem. But then I realized that even with the same screen resolution, the forms themselves (not just the fonts) appeared bigger on the user's PC. Some forms didn't even fit inside a maximized Access window, whereas they certainly did on my PC - again, this is with the same screen resolution. So now I don't know if it's a font problem, some other problem, or perhaps multiple problems.
Which leads to my questions:
(1) If I set the size of a form on my PC, and the screen resolution is the same on my PC and the user's PC, then why does my form show up relatively bigger on some users' PCs? How can one control the look of a form if the form properties are not applied identically on different PCs?
(2) Why do all the fonts look bigger and fatter / bolder on some users' PCs?
(3) Is there a user-configurable Windows setting that overrides the font size settings I assign to controls?
(4) How can I determine in code if specific fonts are supported (if this is a necessary step)?
(5) What is the industry best practice for managing font selection, allowing for the possibility that the desired fonts may not be supported?
I would like all the changes made to fields on my form to be automatically entered into a history list on the form. I can't seem to get the right code for this. I would like it to have the date and time the change was made also. Can someone help me. I have Access 2003 and Win XP. My form is unbounded. Thanks, Lisa
I have a form I open in “Read Only” mode (via a macro). I’d like to add a button to the form that would allow editing of the record (i.e., the default would be "read only" unless the button is clicked).