Loosing Lines On Main Form After Navigating To Another Tab
Sep 11, 2006
I have a main form that displays four lines of data. I have a tab control with 3 tabs. The form displays perfectly until I navigate to one of the other tabs and back to the main tab. It appears to scroll down a couple of lines and I loose the top line of data.
I have a form and a subform for data entry.It is often the case that not all the data may have been entered and so a user might need to go to recordID 24 in 30 already entered main records.However, he needs to get to that record via a (unique) 1-1 field. How do I create the form so that as well as being able to go to the first, the last, the next, the previous record, I can go to a record of my choice.
I need to navigate through all records for a table where a <field> = a certain "string". Ideally I would have a next record button that would know to ignore records that do not meet my criteria?
Simply put, Next available record where <field> = "string"?
I'm having a problem with a form/subform. The table I'm using includes the fields: date, personnelID, status, comments. The main form has a single field, date. The subform has the fields date, personnelID, status, comments. I have the form/subform linked using the Date field, because there are multiple instances of the same date in the table, I have to keep clicking the navigation buttons on the main form to go through all the duplicate dates to get to the next one. Is there a way I can filter the Date field on the Main form to only show one copy of each date? I had thought about creating a new table with only a date field and no duplicates, then just append all dates from the main table to this one and use it to go through the dates, however I'd rather not have to make an extra table just for this. This is basically for personnel accountability, I want to be able to select a date on the main form and display the "daily status"(present, on leave) for each person in the subform.
Even better would be if I could create a next and previous button to switch the date on the main form(I know how to do this.) but how would I get the subform to update the records to the date on the main form and keep it from going to dates that don't exist?
I was wondering if anybody could help with this. I have searched through this forum and there doesnt seem to be an answer to this.
I have a form that i would like to validate. At present i have put the data validation on the save button which triggers a script that checks to see if certain boxes have been filled in on the form. I can only get this to work be attaching it to the onclick event on a save button, however, what i really want is to be able to ditch the save button (since access writes to the DB as it goes along) and have this script triggered whenever the user tries to navigate to either a new record/ another existing record or close the form
I tried putting this on the beforer update event, but this does not work, additionally tried doing before update event with the code inside an if me.form.dirty = true statement this did not work either, has anybody got any suggestions
Please see my code below
Thanks
Marcus
Dim sDeliveryto As String Dim sDeliveryValid As String Dim sDept As String Dim sDeptValid As String Dim sReq As String Dim sReqValid As String Dim sReqNo As String Dim sReqNoValid As String Dim sReqPoint As String Dim sReqPointValid As String Dim sOrderDetailsValid As String Dim sQuantity1 As String Dim sQuantity1Valid As String Dim sDetails1 As String Dim sDetails1Valid As String Dim sPrice1 As String Dim sPrice1Valid As String Dim sSupplier1 As String Dim sSupplier1Valid As String Dim sCostCentre1 As String Dim sCostCentre1Valid As String Dim sAccountCode1 As String Dim sAccountCode1Valid As String Dim sAuth As String Dim sAuthValid As String
If sDetails1Valid = "Invalid" Or sQuantity1Valid = "invalid" Or sReqPointValid = "Invalid" Or sReqNoValid = "Invalid" Or sReqValid = "Invalid" Or sDeptValid = "Invalid" Or sDeliveryValid = "Invalid" Or sPrice1Valid = "Invalid" Or sCostCentre1Valid = "Invalid" Or sAccountCode1Valid = "Invalid" Or sAuthValid = "Invalid" Then MsgBox "Please fill all highlighted fields on the form!!!!!" Else
DoCmd.Save MsgBox "Is all the information Correct?", vbOKCancel
I have a form that reads records from a query.. It loads the first record into the form, without issue.
Code: Sub FormLoaded() Dim r As DAO.Recordset Set r = CurrentDb.OpenRecordset("Results") ' Query we want Forms("frmmainnew").lbladdUser1bad.Visible = False
[Code] ....
Now I have have 2 buttons at the bottom of the form, one for next record and another for previous record...
Code for next record
Sub NextRecordbtn() Dim r As DAO.Recordset Set r = CurrentDb.OpenRecordset("Results") ' Query we want r.MoveNext If r.EOF = True Then
[Code] ....
I know that I have 3 records that result in the query named "Results", the next record button will bring the form from record 1, to record 2... however it will not move from the 2nd to the 3rd record...
Hi, Sorry noob here with a noob question... I built my first database for my work, and I want buttons that can navigate through the records on the form view, but I want them to be like A,B,C,D etc... When I click the button I want it to go to the first last name in the record of that letter of alphabit.... I know it can be done because at my previous employment they had that feature. Please help... I can't figure this out... :confused: Also, how do I import IMT forms into an access database???
I have a form which consists of four (4) tabbed sheets. The first sheet is the main form and the other three sheets are the linked subforms.
Pressing the tab key on the keyboard navigates from field to field in each individual form; however, I would like that when I get to the last field of each form, pressing tab moves to the next sheet or the first field of the next subform.
The problem I am getting is that when I get to the last field of the main form and/or subforms, hitting the tab button creates a new record in the specific form, which I do not want. I want to just tab to the next subform.
I have a database with a Main Menu Form, containing a Button that loads my main data entry form. When the Button is Clicked portions of the data entry form that is loading shows through the Main Form Background (e.g. portions of the navigation bars, and portions of the boarder on the form that is loading.)
I have a subform which makes a change to a field on the main form. When focus is returned to the main form, the BeforeUpdate and AfterUpdate events fire. Why? I thought from the form's perspective, the subform is just another control.
BTW, I get the same behavior if I modify the field from within the Exit event of the subform control.
In either case, the main form's Dirty event is NOT triggered.
We have Access 2000 database. Everythign is working fine but suddenly it have started loosing information. I entered one record last week and its not showing up now. I am not a remote user. I entered the data from local machine. Do someone have any idea about this issue.
I have a form, based on a table, with 3 fields, Ref (a reference number preceded by a G i.e. G14), a Definition (text) and a sort key (number field I put in because I couldn’t work out how to sort on the digits in the Ref).
I have set the records to appear in continuous forms and want them to be sorted in numerical order by the sort key (like they are in the table the form is based on).
However, the form always reverts to sorting them by the ref field, which is text so the order comes out as G1, G10, G11, G2..etc. If I select the sort key field in the form and the sort A-Z button it works but doesn’t stay like it.
I have tried to use the Order By field in the properties for the form but even though it says Sortkey in there it doesn’t actually sort by it…..
I have all my active databases on the same shared folder over the server. Database A has three tables linked to database B. The problem is that every morning when we log into database A, the link to one of the tables is missing, always the same table. I re-linked the table in the mornings, users log in and out during the day, no problems at all, the next day, gone again!
Both databases are .mdes. We are using Access 2003. Any ideas?
I have a one to many to many relationship; with the "Cascade update related fields", and "Cascade update related records" on the relationship properties checked.
Since I have split the DB to FE and BE, the relationship properties (for the 3 tables on the FE) is grayed out and cannot be changed. In addition, the "Cascade update related fields", and "Cascade update related records" on the relationship properties is unchecked.
(The relationship properties on the BE is still configured to Cascade update.
i have created a query to do the calculation of how much stock came in went out and is still on hand .the problem im having is that it shows me the 0 total for product with no stock in it when i put my criteria as >0 in my goods on hand field it show me no data in the query.
my calculation fields is as follows GoodsOnHand:[GoodsIn]-[GoodsOut] Goods in gets calculated as follows GoodsIn:Nz([SumOfGoodsIn],0) Goods out get calculated same way as goods in.
The Reason i have a sum of goods in is because i have to calculate the quantity in another query because it is spread over lots of locations.
I want to create an access spreadsheet form in which the user can add data, which will be - after being processed - added to a database table. The spreadsheet form is for this reason not directly linked to a database table.
In the spreadsheet that I actually have, I manage to copy paste data from an Excel spreadsheet. However, only the first row is pasted. Access doesn't add new record lines for the other rows of my spreadsheet.
How can I make Access add record lines in function of the data on that is pasted? Or if this is not possible, how can I add sufficient additional lines myself?
I have 2 databases Product, with 3 entries ProdID, ProdName and UnitCost. 2nd database Order has Order ID, ProdName, UnitCost, Quantity, SaleDate and Total. I want to create a form to input data into the Order databse that allows me to enter several rows using the data from the product table by selecting ProdName(Product) from list and UnitCost(Product) being inserted into each row automatically as a new ProdName is selected. Can anyone hsuggest how best to do this.
I have created a forum that all fields are unbound. On completing it is written to the table using a RunSQL command. This writes to the table with no problem but when it does so it is creating another entry with zero content. This is the save steps with open new form
Code: Private Sub SaveRecordAddNew_Click() Call PreSaveCheck If Me.saveCheck = False Then Exit Sub Else Call WriteToTable
The purpose of my database is to keep a record of training activities undertaken by staff. There is therefore a multiple form which displays, for a specified worker, the list of all the required activities. Each line has a button which opens another form to allow an activity to be started (together with start date and other info). The main tables are Worker, Activities, and a junction table Worker2Activities. On closing the second form and refreshing the first one, the started activity is correctly recorded, but on as many lines as there are staff on the course. To make matters worse, these also appear when i then select another worker (and if i create another worker, the number of lines goes up by one for all of them). The Worker2Activities table correctly show one new record created
If an answer to this is out there, sorry. I haven't had luck finding anything. I have a form with an unbound combo box. When you select an item from the box, the objects on the form and subform fill in based on the selection. The person using this would like to click arrows to navigate through the combo box. How do I do this?:confused:
I have several tables linking our employees to certain supervisors, etc.On the Form, there is a drop down with all employees listed that someone can select and then enter the stats required. When someone leaves the firm, I want to remove them from the form dropdown list, but not delete them from the corresponding table. I have seen this in other databases where they someone added an 'Inactive' column with a Yes/No response and when you selected the inactive - yes, that name would disappear from the form when people select names from a dropdown to enter stats.how to make the names disappear from the view in a form, but not in the table related to that form?
I have a form that contains a pretty large list of items and several columns and the list can be sorted by each of these columns. When a user double-clicks on a particular item, another form pops up that lets the user view/modify the item. The problem I'm having is that I still want to be able to use the navigation buttons in that second form, but right now its just saying 1 of 1 (Filtered).
The way I'm applying the sorting is by updating the Rowsource field of the list with an "Order By" statement
Hi with the help of this site, i have made big advances in learning and adapting code, in building my access FE on an SQL BE.
however, i have a problem, i cant find any information on in how to resolve.
i am using menus to navigate between forms, but i cannot synchronise the critical value between the forms.
so i am on a form with critical value, say hullID
i use a menu command to open another form, but i need the form to open with the same hullID as the critical value as the previous form which is about to close.
because i can go to the new form from any form, using the menu command, i cannot directly link the critical value,
is there a way to use the critical value from the current focus form, to the new opening form
1st Form Name: Mainform Text to enter employee ID : empid
Sub form within Mainform: SFTimesheet (continues form) text to enter: Timein, Break, Timeout
SFTimesheet shows and accept entries for each employee called using the text empid, on the mainform
I wanted the subform to show 7 days /lines starting from Sunday to Saturday of current week and dating the text "Timein" accordingly. When employee enteres an entry on the 7th Line, it should give them a new 7 lines for the new week to begin.