Freezing Columns In A Form
May 9, 2005Is it possible to Freeze the scrolling on a form so that the first few fileds are always visible when I scroll to the end?
View RepliesIs it possible to Freeze the scrolling on a form so that the first few fileds are always visible when I scroll to the end?
View RepliesI have a form (frmMain) which has a header with some basic links and text boxes I would like to keep as a frozen pane on top as the user are scrolling down the detail section of the form. The detail section does include a subform if that makes a difference (frmhome). When going to Options>Current Database> tabbed documents, the form header stays frozen perfectly.
I however would like to use "Overlapping windows" as the form center aligns in the Access window instead of left aligning when using "tabbed". So either :
1) how do I keep the header frozen in "overlapping" or
2) how do I center align the form in "tabbed" view, as right now the form just wants to go as far left as possible in the full Access window.
I am about to give this database to a client. It basically manages deliveries. Everything on my form is functional. The problem is Access seems to freeze indiscriminatly. I have no idea why. I don't believe Access is processing code when it freezes because control-break does not even work. I am hoping some of the locals here can take a look at my DB and maybe find the issue. This was written in A2K3.
The freeze can be broken by clicking into another program then back to access again. The freeze seems to occur onload, on new record and on filter.
I have a database that I have setup to compact and repair every time I close the program. The database will begin the process of compacting and repairing then when the status bar gets about half way across the process will simply freeze on me. I have let the program run for up to 10 or 15 minutes. I end up click the close button and closing the database. Also there does not seem to be any error with the database since I can open the database and work with it and run reports, it just won't compact and repair.
Thank you for any help
:confused: Hi all - hope someone can help I dont know where to start.
I've got a cmd button that imports data from a excel sheet - that actual code is working fine, however when it runs it causes Access to freeze.
The data in imported correctly - so it must complete the process but Access locks up and has to be ended via task manager.
Any one got any clues why this is happening and how I can stop it?
This is an Access 97 database running mainly on NT and 2000
Private Sub LoadActualsDataButton_Click() On Error GoTo Err_LoadActualsDataButton_Click
' This procedure performs a two file match between the Actuals table (the Master file) and ' The Actuals spreadsheet file (the Transaction file).
'
' Keys : Study Code|Work Package|Period
'
' If the Master key < Transaction key then
' Read the next Master record.
' If the Transaction key > Master key then
' Add the transaction record to the Master file
' Read the next Transaction record.
' If the Master key = Transaction key then
' Update the value on the Master record with the value on the Transaction record
' Read the next Master Record
' Read the next Transaction record.
'
' End of File processing
' At End of File on the Master file, set the Master key to "ZZZZZZ"
' At End of File on the Transaction file, set the Transaction key to "ZZZZZZ"
' Continue processing until both keys are equal to "ZZZZZZ"
Dim MyDB As Database, MySQL As String, MySet As Recordset Dim appExcel As Excel.application Dim MyFiles As String Dim MasterKey As String, TransactionKey As String
Set MyDB = CurrentDb()
Set appExcel = CreateObject("Excel.Application")
' Set up the transaction file (Actual Data Spreadsheet)
MyFiles = appExcel.GetOpenFilename("Excel Files(*.xls),*.xls", , "Open Actuals Spreadsheet") If MyFiles = "False" Then Exit Sub
appExcel.Workbooks.Open FileName:=MyFiles, ReadOnly:=True appExcel.Visible = False
' Check that this is a genuine Actual spreadsheet On Error Resume Next Let Err.Number = 0 appExcel.Sheets("Sheet1").Range("B1").Select
If Err.Number = 9 Then
MsgBox "This is not a valid Actuals Spreadsheet."
appExcel.Quit
Exit Sub
End If
If appExcel.ActiveCell <> " Extracted Actuals Data" Then
MsgBox "This is not a valid Actuals Spreadsheet."
appExcel.Quit
Exit Sub
Else
appExcel.ActiveCell.OffSet(1, 0).Range("A1").Select
TransactionKey = appExcel.ActiveCell.OffSet & appExcel.ActiveCell.OffSet(0, 1) & appExcel.ActiveCell.OffSet(0, 2) End If appExcel.Visible = True
' Set up the Master File (Actual Table)
MySQL = "SELECT Actuals.[Study Code], Actuals.[TBCS Code], Actuals.[Year/Month], Actuals.Actual "
MySQL = MySQL + "From Actuals "
MySQL = MySQL + "ORDER BY Actuals.[Study Code], Actuals.[TBCS Code], Actuals.[Year/Month]; "
Set MySet = MyDB.OpenRecordset(MySQL)
If MySet.EOF Then
MasterKey = "ZZZZZZ"
Else
MasterKey = MySet![Study Code] & MySet![TBCS Code] & MySet![Year/Month] End If
Do Until TransactionKey = "ZZZZZZ"
If MasterKey < TransactionKey Then
' Read the next master record
MySet.MoveNext
MasterKey = MySet![Study Code] & MySet![TBCS Code] & MySet![Year/Month]
GoTo Next_Loop
End If
If MasterKey > TransactionKey Then
' Add a new record from the Transaction to the Master
MySet.AddNew
MySet![Study Code] = appExcel.ActiveCell
MySet![TBCS Code] = appExcel.ActiveCell.OffSet(0, 1)
MySet![Year/Month] = appExcel.ActiveCell.OffSet(0, 2)
MySet!Actual = appExcel.ActiveCell.OffSet(0, 4)
MySet.Update
' MySet.Requery
appExcel.ActiveCell.OffSet(1, 0).Range("A1").Select
TransactionKey = appExcel.ActiveCell.OffSet & appExcel.ActiveCell.OffSet(0, 1) & appExcel.ActiveCell.OffSet(0, 2)
GoTo Next_Loop
End If
' Keys are equal so update the Master with the Transaction value
MySet.Edit
MySet!Actual = appExcel.ActiveCell.OffSet(0, 4)
MySet.Update
' GoTo Next_Loop
appExcel.ActiveCell.OffSet(1, 0).Range("A1").Select
TransactionKey = appExcel.ActiveCell.OffSet & appExcel.ActiveCell.OffSet(0, 1) & appExcel.ActiveCell.OffSet(0, 2)
MySet.MoveNext
MasterKey = MySet![Study Code] & MySet![TBCS Code] & MySet![Year/Month]
Next_Loop:
Loop
Exit_LoadActualsDataButton_Click:
Exit Sub
Err_LoadActualsDataButton_Click:
MsgBox "An has occured." & vbCrLf & vbCrLf & _
"Error number: " & Err.Number & vbCrLf & vbCrLf & _
"Description: " & Err.Description
Resume Exit_LoadActualsDataButton_Click
' = Mid(ActiveCell, 1, (Len(ActiveCell) - 1)))
End Sub
Private Sub MainMenuButton_Click()
On Error GoTo Err_MainMenuButton_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Main_Menu"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_MainMenuButton_Click:
Exit Sub
Err_MainMenuButton_Click:
MsgBox Err.Description
Resume Exit_MainMenuButton_Click
End Sub
Private Sub MaintainContactTableButton_Click()
On Error GoTo Err_MaintainContactTableButton_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmBDTSContactsMaintenance"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_MaintainContactTableButton_Click:
Exit Sub
Err_MaintainContactTableButton_Click:
MsgBox Err.Description
Resume Exit_MaintainContactTableButton_Click
End Sub
Private Sub MaintainersNBTUsersButton_Click() On Error GoTo Err_MaintainersNBTUsersButton_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmBDTSMaintainNBTUsers"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_MaintainersNBTUsersButton_Click:
Exit Sub
Err_MaintainersNBTUsersButton_Click:
MsgBox Err.Description
Resume Exit_MaintainersNBTUsersButton_Click
End Sub
my requirement was for a control in a subform and I needed all this to affect a first column freeze.The code was in the Onload for the main form.
Code:
Dim ctl As Control
Set ctl = Forms("frmPlanner").Controls("subfrmTempCtrl")
Me.SetFocus
ctl.SetFocus
ctl.Form.Controls(0).SetFocus
DoCmd.RunCommand acCmdFreezeColumn
It does work but I can't fathom why I need more than the last .SetFocus. Leave any of the prior ones out and it gives an error to the effect that can't do it in those circumstances. I understand the control has to have focus for it to work but why are the other's required?
Guys, my database have 7 fields and 690 thousands of lines.
When I resort, for exampe by date field, the database on my P4-3.2 with 1gb memory, on Access 2003 with XPpro freezes and does not respond at all!!!
On my old P3-866 512mb with Win2k it was working! After 3 minutes the computer was getting back.... But now.... I waited for 20 minutes. The access doesnt load not a CPU, and no IO readswrites are done - it simply stops responding.
What can we do with it? Why the perfomance is SO LOW?!
I was able to use the UNION ALL qry. But, when I have another file (like original2) that does NOT have all the columns listed in the UNION ALL qry, I get a Parameter value box asking for the missing columns when I run the qry.
Example:
original1IDDateGroupChristianJohnnySteve 18/5/2013A1528/5/2013B338/5/2013C2348/5/2013D2358/5/2013E5
original 2IDDateGroupChristianJohnny18/6/2013A212528/6/2013B2338/6/2013C2248/6/2013D22
The UNION ALL qry includes all the possible resources ( includes all the possible column fields Christan, Johnny, and Steve).
When I run the UNION ALL qry with the original2 file, An "Enter Parameter Value" box is displayed with the mssing column name "Steve".
Is there a way to Map the original2 table into a working table with all the columns, or use VBA code to construct the UNION ALL qry to only include the existing columns? My data has variable columns and I'm trying to avoid the parameter popups.
I have a MS ACCESS 2010 database with a data table which i am trying to create a query from. I have 6 columns of data( one with an ID Field and 5 Name Fields). Below i have made examples of how it first appears as a simple query and the second will show you what i would like it to look like.
What the simple query looks like: [URL] ...
Second what I want the query to look like: [URL] ....
Hi all!
First of all sorry for my terrible English! ;)
I have a very simple question (I think). I have a table with 2 columns in it, filled with city names and their id's. For example:
city - id
rotterdam - rd
amsterdam - ad
new york - ny
london - ld
I have a form with this city-table as a dropdown menu to fill in the control. What i now want is, when I select the city, a different text field named ID must be filled in with the corresponsding city-id.
So, how do I fill in 1 field when a edit the 2nd field?
Thnx in advance!!
Hi all!
First of all sorry for my terrible English! ;)
I have a very simple question (I think). I have a table with 2 columns in it, filled with city names and their id's. For example:
city - id
rotterdam - rd
amsterdam - ad
new york - ny
london - ld
I have a form with this city-table as a dropdown menu to fill in the control. What i now want is, when I select the city, a different text field named ID must be filled in with the corresponsding city-id.
So, how do I fill in 1 field when a edit the 2nd field?
Thnx in advance!!
Can you arrange records in columns on a continuous form? When I select Columns in Page Setup it seems to only affect the print layout. I want to be able to view my narrow details in two or three columns across the screen instead of scrolling down. Is it possible?
View 1 Replies View RelatedI'm a bit stuck on creating a chart in Access 2010. Not sure if I've set my table up right or not
Here's my table design
And the input form
My data is laid out like so
When I insert a chart though, I'm lost. It's like it's totally ignoring my data. The data isn't mine, it says east, north and west like a 'default preview chart'. The row source is
Code:
SELECT [student_id],Count(*) AS [Count] FROM [tblProgressLevels] GROUP BY [student_id];
Which means nothing to me I've managed to get most of the other stuff figured out, but these charts are confusing me.
Output??
What I want it to do is show how the student is progressing but I've got it all back to front I think. How could I lay my data out so I have a single English column, a single maths and a single science and they still go up in terms like my form shows; they're all in the same table at the moment laid out the same way as I set up the English tracking.
I also just realised I'm trying to chart alphanumeric values stupid boy... Can Access do a conversion where I make a lookup table so that 1c = 1, 1b = 2, 1a = 3, 2c = 4, 2b = 5 etc. or would a query work?
I can't get my columns on a form to resize and have the rest of the columns move along with it. So e.g. if I have a form with headers and under that a couple of records, I want to resize the middle of three columns. If I select the column and then select, with shift, also the column header, I can resize the column. But the column on the right side doesn't move along with it. So I have to reposition every column after the resized one.How can I get Access to pick up that I want to move the other columns too?
View 1 Replies View RelatedI've got a data entry form that is used to enter incoming waste consignment data. (I've attached a screen grab of the form) Each screen represents one record and the data is recorded in a table called "IncomingWaste". The top of the form (light blue) refers to the customer/producer of the waste. Most of that detail is held in another table on the db. The bottom (Dark Blue) part is used to record the consignment data. It gives the user a grid to enter the individual waste components within the consignment (choosing from Drop down menus for the various descriptive elements) Most crucially, the weight of each component is recorded.
I have a calculated field at the bottom which gives a Total weight for that consignment. It simply adds the weight fields together and delivers a total in the box at the bottom of the screen which displays the total weight in that consignment using "Nz([weight1])+Nz([weight2)]+ ...etc - which works fine on the form. However, I can't seem to get this calculated total recorded and appended to each record in the table and I assume it must be re-calculated each time the screen loads (?)
The main issues is.... I need to create a report which adds the total weights from each customer over a monthly/quarterly period and I simply cannot seem to do it.
I have created the report which groups all the consignments from each customer and lists them in date order, but I can't identify or define the method I need to use to collect that Total Weight calculation from each consignment record and add them up to give a grand total for that customer for a particular period. I'm assuming if I can crack the first part and get the total recorded in the table, then I can call the value into the report.
Currently I'm building tables and forms. My first table (called Clients) lists the details of fictional clients. My second table is for invoices.
In my invoices table, I wish to link the column for client reference (note: stored in the Clients table) to the column that precedes it. This column will list the clients’ names and is selected from a drop down list that is linked to the Clients table.
What I want to do (if its possible) is to have the respective client ref. automatically show up in the next cell once I've selected the client to whom the invoice relates?
Am I making sense? Is that possible? If so, how do I do it?
Secondly, how do I do a sum of selected columns for my “totals” column? Basically, I want to add the figures found in several cells that precede it?
I'm affraid my confusing topic title is an indicator of how confused I am by this. I can't even understand the variables well enough to fully utilize Access Help or the Search function here...
What I have is a database hat has column headers that look something like this:
Customer_Name, Order_Date, Qty_Ord, Unit_Price, Total_Price
What I'm trying to get is a query output that will have
Customer_Name, Total Orders (in Dollars) for January, Total Orders (in Dollars) for February, Total Orders (in Dollars) for March, etc.
I've been able to set it up to SUM for one month, but not multiples.
I know I'm totally lame (for proof read any of my previous posts) but you guys totally bailed me out the other time I asked a lame question.
Thanks in advance!
I am pretty new to VBA and I am having the same problem of hiding and un-hiding columns on a datasheet of a split form. I am building a system that will be used in front of customer and therefore wish to hide columns that contain cost sensitive data. The same forms need to be able to show the Sales Rep the hidden columns simply by ticking a box. Basically a toggle on and off of hidden columns.
I have been playing around with the code below (which i found in another forum) to hide the Field called COO when I click the tick box called chkHIdeFields check box. This works on a Single form but not on a datasheet of a split form.
Private Sub chkHideFields_Click()
' Note: vbTrue = -1
If Me.chkHideFields = vbTrue Then
Me.COO.Visible = True
Else: Me.COO.Visible = False
End If
End Sub
I have been able to hide the column of my split form by using the ColumnHidden property of the On Load event just as a proof of concept that the ColumnHidden property actually works to hide a column, which it does. This is the code that im using to hide the column called COO.
Me.COO.ColumnHidden = True
However if I then set it to = False and then close and open the form, it doesn't unhide the column. the only way I can unhide the column is to do it from the Form view via the un-hide dialogue pop up box.
I have two issues here, the first one is getting the form to recognize when to hide and when to show the column of the datasheet on the split form and the second is to get the code to for the check box method.
Lastly once I get it working for 1 field I need to be able to define a list of 7 or 8 other fields all at the same time.
For some reason when I change the order around of the columns in a split form or subform 90% of the time it wont save (right click save, file save, etc..) and have to constantly redo it until it finally works. Am I missing something obvious as to why this is happening?
View 3 Replies View RelatedI've created several Split forms that have the data input fields in the form with the relevant query datasheet shown below. As you tab through the form fields, the various cells in the datasheet are highlighted and move across the data row (as one would expect!). I want to put a particular field / Column at the start of the datasheet so that it's always available for view, but it seeme that what ever I do the column ends up back at the very far end of the data row!
I've sussed out the "Freeze Fields" facility which will keep the first column visable whichever cell is highlighted across the data row.
The column I want as the first column currently sits at the far end of the data row. So far I have dragged the row to the first column position; I've arranged the Query driving the form so that the column is at the front of the row, both in design view and in datasheet view, but to no avail. Everything I do to put the column at the start of the row in the datasheet shown below the form ends up with it back at the far end of the row the next time I open the form.
Currently I have a query where the criteria is dependent on the combo boxes on my form. I would like to add checkboxes to my form which determines which fields are shown or hidden. For example if I had a checkbox for address, selecting it on my form will show the address column in my query results.
View 4 Replies View RelatedRuntime Error 3075? I have attached a copy of my database. I am trying to make a calendar form with the list boxes having two columns. It works fine with the strFieldID and strFieldName but when I try adding the strDone I run into the error.
View 6 Replies View RelatedIm working in Access 2007.
So i have query based on 1 table that populates a Form. The primary key for that table is Entity ID. Therefore once the query has been run I have multiple records that i can scroll through in my form distiguished by their Entity ID.
I have a second table that has a Entity ID column, AFE Available column, and many others. The primary key for this table is called Match ID. This table contains records that have the same Entity ID.
My goal is to display on the form the Sum of the "AFE Availible" for each Entity ID. so as you scroll through the records the Entity ID is changing and you are able to see a the Specific "AFE Availible" Sum related to the current Record showing on the form.
I couldn't figure out a way to have a query based off both tables where the records are only uniquely defined by the Entity ID in Budget Info. What was happening is the query was displaying all the records that had the same Entity ID because of the AFE Spent table. That way when you scroll through the records the form shoes records with the same entity id.
Maybe im doing it all wrong and you dont need the tables attached to the same query. That would make it easier i think. So you would have two queries populating different text boxes on a form. Is that even possible?
I have a listbox that is populated with data from a table. I would like to use one of the columns data as the where clause of a sql string that will populate another form, how do I get the selected items column data that I need into a variable? This is in Access 2010 vba.
View 9 Replies View RelatedI am trying to obtain totals from two columns in the list box into text boxes on the main form, but my third argument is not working as expected.The source of one of the tex boxes is:
Code:
=DSum("Airtickets","T_Training_Participants.ProgrammeID=Me.lstParticipants")
I want to sum only amounts of the records that equal or belong to a selected programme (ProgrammeID) in the bigger list box above.
I've got a main form with two lists boxes. I want to show the visible columns in my subform (which is a datasheet) in one listbox and show the hidden columns in the other. Also I want to allow the user to hide / show columns using right or left arrow buttons between the list boxes. My subform is bound to a stored procedure using ADO.
View 5 Replies View Related