Content To Control Changed On Open Or View
Dec 22, 2006
Hi
I have a text filed on a tab control on a form. What I want to do is when the record is opened for viewing I am it changed the contents of that field. The reason that I am doing this is that I am auditing the changes in the database and any changes to any of the fields are recorded on the in this table along with the users windows username.
This would put an entry in the audit table for everytime a record was opened, even if no changes were made to the record and I want to use this information to create a last ten records form for the users to view there last ten records.
Does anybody know how I can do this.
Thanks
View Replies
ADVERTISEMENT
Jul 8, 2013
I am working on a report that will have 16 sub-reports, one right below the other. Because of the complex nature of the calculations in the groupings it seemed easier to "build" the report using vba rather than using the report's built-in grouping ability. The issue I am running into is that there seems to be no simple way to control the height of the sub-reports. I had hoped that setting "can grow" to yes would change the height of the sub reports and move all subsequent sub reports down (Allas)
As an alternative I thought too that I might be able to set the height of the sub-report control, which would make for a tricky but not impossible bit of programming, but (Again allas) I can't seem to find a reasonable way to determine the required height of the sub-report's control.
View 3 Replies
View Related
Jul 31, 2013
On a form (default view: Single), I have a bunch of bound controls that display one record at a time from tblMain. I have a bunch of unbound controls as well (buttons).
If the user tabs through all the controls, reaches the last one (btnLast), and presses tab again, the focus is set to the first control (btnFirst) and the bound controls change to display the next record. I just want the focus to be set to the first control without the displayed record being changed.So I set up an "If" statement in Private Sub btnFirst_GotFocus()
Code:
If Screen.PreviousControl.Name = "btnLast" Then
[code to change record back to previous record]
End If
But btnFirst gets the focus when the form opens, so Screen.PreviousControl spits out an error.I've accommodated this like so:
Code:
On Error GoTo ErrorHandler
If Screen.PreviousControl.Name = "btnLast" Then
[code to change record back to previous record]
End If
Exit Sub
ErrorHandler:
Exit Sub
View 2 Replies
View Related
Apr 16, 2007
Can I create contents of one field based on the contents of others?
I have a database of pc systems which we've tested and was wanting to generate a single text line to identify the individual pc
The single filed would contain data from the following fields
Job Number
CPU Type
CPU Speed
RAM
HDD size
eg
So the new field would contain "Job345-P3-1000-256-20"
Can this be done?
View 3 Replies
View Related
Jun 1, 2006
Problem:
Visual Basic run-time error 7792: You can't open a subform when it is also open in Design view.
I have a subform with properties for SourceObject, LinkMasterFields, LinkChildFields changing according to objects and events in the master form.
The subform was bound to a query before which meant that the subform load event was happening as soon as the master form is loaded. I needed to restrict the subform loading until a certain point so I removed the SourceObject property for the masterform's subform. The subform on the master form is now Unbound.
(This is because I'm now running some code on the FormLoad event for the subform which needs to be restricted until the LinkMasterFields and LinkChild Fields properties have been assigned correctly otherwise it takes ages to load.)
Now I'm getting the above error. Obviously, i do not have the subform open anywhere in design view. No Visual Basic windows are open. I've closed the db, closed access, reopened it and clicked on nothing except the masterform. The error occurs when I raise the event in the master form which assigns the sourceobject property to the subform, i.e.
Me.sfmQryAllOV.SourceObject = "sfmQryAllOV"
Can anyone help me? I've googled this but finding no answers.
View 1 Replies
View Related
Feb 4, 2015
how many elements matching to my primary elements from any records of my query and count match, if some element doesn't match then I need to add it to my primary elements, then at the end (rst.eof) count how many primary elements I have.
E.G
id colours
1 blue;red
2 purple;blue;green
3 red;violet;purple;blue
dim matching_elements as long
dim primary_elements as string
dim TheNumberOfPrimaryElements as long
First of all, if I open recordset primary_elements is empty so I need to assign a value form first record.
primary_elements = rst!colours (so primary_elements = blue;red)
Now I can start comparing my primary_elements with second record:
matching_elements= 1
primary_elements = blue;red;purple;green
comparing my primary_elements with third record:
matching_elements= 3
primary_elements = blue;red;purple;green;violet
It's my last record so I need to count primary_elements
TheNumberOfPrimaryElements = 5
I need "matching_elements" to count other function in my application.
View 7 Replies
View Related
Nov 25, 2013
As I began thinking about the data that I need to include in one of my reports I relized that I need to gather some extra data.Each design change has a lifecycle with 7 basic states from not started through to closed. States 4, 5, and 6 have two posible sub-states that I need to capture and report. It is almost like having options.
My data entry form already records the 7 basic states. What I would like to do is have another field that records the sub-states if the design change is in one of those three states.
Will a ComboBox do this?
Do I need a test routine for the After Update event in the first text box? Something that will check for states 1 - 3 and 7 move on to the next field and if states 4 -6 require users to enter the sub-state.
Would a nested if-then-else routine do the job?
View 1 Replies
View Related
Aug 14, 2006
Hi guys,
I know this has been discussed before, but I cannot seem to find any threads regarding this issue.
So, I'm using the tab control on my form, but every time I open my form the view scrolls down and I cannot see the actual tabs. Is there any way to correct this?
Thanks
kruger101
View 4 Replies
View Related
Oct 12, 2006
Hi,
Can anyone advise why I am getting these two error messages in attached image.
I am running Access 97.
The first message refering to fDesign appears each time I have something open & click on the Design View icon.
The only way I can go into design view for a form or table etc is when I am in the tab windows for the table or form highlight it and click on Design.
The second error message refering to the refresh appears whenever I try to run a refresh command button created via the wizard.
I have the same refresh command buttons on other forms I created earlier on & have no problems with them when run. If I create a new refresh command button on same form it works. But any new forms I create I get this error.
Can anyone please advise what I am doing wrong or which settings I should look at as I have tried most settings.
http://users.tpg.com.au/roccob/fdesign.jpg
Tks
View 2 Replies
View Related
Jun 14, 2013
Is there VBA code to select a control on a form that is currently in design view?
View 4 Replies
View Related
Sep 21, 2014
I have a form (frmHourEnter) with a combo box (Staff_ID) that lists staff members from a table (tblStaff). The table form (frmStaff) has a checkbox (ckEmploy) which indicates if a staff member is still employed. If the checkbox is checked how do I exclude that staff member from the combo box Staff_ID in the form frmHourEnter?
View 8 Replies
View Related
Sep 29, 2006
Hi,
I have a form that has a button, when user presses that button another form is supposed to open in minium view. The problem is that: If my main form is maximized, the other form opens as max or the other form makes main form minimized.
I wonder if it's possible for the main form to remain maximized when the smaller form opens?
Regards,
B
View 3 Replies
View Related
Mar 17, 2006
Stupid question, but I have forgotten how to .MDB and go directly to form view. Help, please.
TIA
View 1 Replies
View Related
Oct 26, 2004
Hello all,
This problem has been causing to pull my hair out all morning, so any help would be most welcome.
The business I work for hired a contractor to produce a database, he did a great job and it looks very professional, but he used an ActiveX control to display four months at once, it is a fairly common control but it seems it is not included in the Image for the workstations here (it will be soon).
The OLE class is called MSComCtl2.MonthView.2 and I remembered using the date time picker control (MSComCtl2.DTPicker.2) and I figured that it would make sense if it was in the same ActiveX control, so I registered Mscomct2.ocx and yes, it does contain the right class... but it still didn't work. I found a second control package which also included the class, comct232.ocx (older but it should work) and finally, both of them together do work... for all but one user. It isn't the workstation, anyone else logging into that workstation has no problems.
The problem cropping up is the "control has no object" error and it suggests that I unregister then re-register the OLE server (which is another word for the .ocx files for those not in the know) which I did, and it complains about a missing reference to C:WINNTsystem32Mscomct2.ocx if you look at the references in the VBE editor which makes very little sense to me.
The users do not have admin rights to there computers, but I'm thinking of temporarily adding the user to the admin group (on her computer only obviously) and un-registering then re-registering the control there. That seens abit extreme, and it should just work!
This is driving me nuts, anyone know what I'm missing here?
Thanks in advance
-mwalts
View 6 Replies
View Related
Mar 6, 2015
I want to display a month view control on one of my forms.
I only want to use it for viewing purposes only. But I don't see the Calendar control or MonthView in Activex list.
Where I might obtain such a month view control?
I'm using Access 2010 and Windows 8.1
View 5 Replies
View Related
Jan 31, 2006
Hello All!
I think this will be a difficult question but im going to ask it anyway. Ive tried several ways to open 2 forms. Ok, ive achieved this one by letting a code to open up the Main menu (like where you can press buttons) and the second one is to open a field with the open incidents of the person that is logged in.
First question:
How can i achieve that the form will open with the employee name and its incidents?
So what i mean if i login with the name Michiel and a password of it that the main menu will start up but ALSO the form start up with MY open incidents and ofcourse when i login underneath someone else that their open incidents will open.
Second question:
How can i create actually this kind of of good form with the open incidents in it? Do i need to create lets say 5 special forms with all of his own name in it? Or can i create query's that are looking to the login form and that the right query will be loaded?
Can someone help me out please? :) Im getting desperate...
I will update the first post because i think more people will like this idea!?
View 1 Replies
View Related
Mar 15, 2006
Hey all, Having small issue with forms opening in form view eventhough I have them set to datasheet default.
If I open them from the database window they will open in datasheet view but when I use a command button that I created on a main menu to open the form the always open in Form View.
Any help would be appreciated
View 1 Replies
View Related
May 16, 2006
Is it possible to automatically open a subform in form view as opposed to datasheet view?
If so would someone very kindly advise me on which code to use and where to implement it?
Many thanks folks.
Paul.
View 2 Replies
View Related
Mar 2, 2014
In my access project i used Gohypelink as defined in this website [URL] well, but i want it to pop up in a reduced view?..At the movement it fills whole screen, and the user have to click on buttons to reduce the size. I want the file to pop up in a smaller view.
View 1 Replies
View Related
Mar 14, 2007
I bet there is a simple explanation for this.
I have a form which opens automatically when the database is opened, but I want it to open in the maximised view so it takes up the whole screen.
View 1 Replies
View Related
Oct 21, 2006
Well, I couldn't find this using the search, so here it goes:I have a form in which I enter data to create a new client. Within that form I have a subform in datasheetview which is based on a query which holds/retrieves certain (important) fields from a table that holds case info. So in that one view the client data is displayed on the form and all cases and the most important data from those cases is displayed nicely in one screen.Now, when a client calls I navigate to that client and see all previous and all current cases that are open and/or closed for this customer. So the customer says case this and that number is the case I need to discuss with you. Now, what I would like is to be able to click or double click anywhere on the line that, for instance, says case nr 55, so that the form(s) belonging to case nr 55 pop up and all info concerning that case is displayed and can be edited as needed. My problem is: I'm still a newbie and if it was a simple thing like using the on_click event to open the form that's needed, I would not have to post this question. But that can't be done (as far as I know) since the subform is based on a query which is displayed in dataview.Am I overlooking a very simple solution to this problem or is it really going to be as difficult as I think it's going to be?For clarification of the idea I have included a screenshot of the form in question. I assume there are tons of databases out there which use such a layout or idea as this one. Please, never mind the buttons etc. It is still a work in progress. ;)
View 12 Replies
View Related
Nov 4, 2014
i have the following code and i want that the form opens in datasheet view but i don't know how.
On Error GoTo Err_Befehl14_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Copy Of frm_logistik_zeitfehlerein"
[code]...
View 14 Replies
View Related
Mar 23, 2013
I have a form for data entry into my main table. Some records are correct, but some I need to come back to later and correct.
So I have a button on the form to run the Query which works fine. But it opens in a new "Data Sheet View".
Can I make it open in the original form so I can edit the queried data?
View 3 Replies
View Related
Jun 7, 2015
In fact, I have one principal d/b running on my access, ad/b which I had imported from my iPad... The import went smoothly enough but I face this problem. I usually scroll the table in order to locate a patient's name.
I can't find a way to select this line and have it switched to a card view in order to update it. I need to move to card view, search from there in order to locate this person in card view. I am sure there is a way to select a line ( a record) in table view and jump from there directly into this record in card view.
View 11 Replies
View Related
Feb 4, 2014
With a form in design view, I click on the DESIGN tab on the ribbon and then under TOOLS, I click on PROPERTY SHEET, whick opens on the form. Now I do that and nothing happens. It is the same with ADD EXISTING FIELDS. Neither one appears. Everything else seems to work ok.
View 1 Replies
View Related
May 28, 2015
I need some VBA coding to do the following tasks
Table 1: two columns - Child Tag and Parent Tag. Parent Tags can also be in Child Tag column. In other words, a parent can have multiple levels of children.
Table 2: one column - Backup Tag.
I'd like to have a form with a combo box, pick a Parent Tag, the search all its child tags and compare each Child Tag found with records in Table 2 to see if there is a match. Then populate all results in a tree view control.
A visual example :
Parent Tag
...Child Tag 1 - Back up tag found
......Child Tag 11
......Child Tag 12 - Back up tag found
...Child Tag 2
......Child Tag 21
...Child Tag 3
......Child Tag 31
.........Child Tag 311 - Back up tag found
View 7 Replies
View Related