I have a form, with three different sub forms on it. Rather than us the record counter at the bottom of the subforms, i'm creating my own using this code:
Private Sub Form_Current()
Dim rst As DAO.Recordset
Dim lngCount As Long
Set rst = Me!subform.Form.RecordsetClone
[code]....
which works fine. But if I want to count the records in two subforms, how does that work?! I've tried copying and pasting the code again, but I just get an error
i receive a date and hour in the past and i've got to make an form who displays the next things:
total amount of days from received day till today (day may only update after the received hour) total amount of months from received day till today (month may only go 1 up after the received day/hour) total amount of years from received day till today (year may only go 1 up after the received day/hour)
(the DateDiff function is good but isn't 100% correct)
and at the end of the form i got to give an conclusion like:
XX YEARS and XX months and XX days (not the totals but exp: --> 2 years 3 months 5 days 7 hours 3 minits)
i hope to find out the time myself, if the other are correct
anybody did anything like this before? can anybody help me out?
I have a form called "Customer Details", on that form i have child forms, including one that has a schedule on.. so far everything seems fine, am able to get it to pull data correctly to the correct fields.. etc
I'm using 1 main table for all of this called "Cases"
Now the problem is, when i i click a button to print (this works so far), it opens another form and then fills in all the textbox's, however this is where i've got the problem, as it always seems to pull the data from the first record, not the record that i'm currently on..
so for example, if in the customer details, someone looks up "joe Blogs" using the navigation search and then wants to print it, by hitting the print button .. it should open another form, fill in the boxs and print "Joe Blogs", however it's always doing "Joe adams" - 1st Record
How can I prevent duplicate records from being added from a form, the dcount in the text field property, trigged before update is where this should be used is what I know but having trouble with the syntax.
I've got the table tblInvnetoryDetail with InvID(AutoNumber), and SerialNumber. The form text field is txtSerialNumber. I've managed this far with the expression
DCount([InvID],"tblinventoryDetail","[txtSerialNumber]=&"'") but this did not work.
Form 1 with ask for details about one aspect of the client such as personal details.
I will then need a next button and it will go to form 2, summarizing what has been inputted and now asking for the next lot of details such as their requirements.
I am guessing I could have 2 separate tables for the details and link the 2 but I have inputted lots of data already and I want to use that table as the source.
The main bit I am concerned about is when I go to form 2, how will it know to relate to the client I put in form 1?
I have a main form with multiple subforms in tab view, right now the forms only open in edit mode, I would like all forms to open to new record mode. I know I can set the main form with the switchboard manager but what about the subforms?
I have a database that I created a few years ago. I have a main form from which other forms can be opened by clicking on a button. This is working quite well. If I am on record ID 9 it will open record ID 9 from the table associated with the next form. My issue is if a new record has been created on the main form.
I had this set up to carry the new ID number to the next form so that it functioned similarly whether the record was new or already existed. I think when they upgraded to Access 2010 this stopped working and I can't remember how I got it to work in the first place. I think it might have been in the form properties or something because the code on the button is just matching on ID between the two tables. How I can get this function back?
I'm creating a database that has a registration form for new employees, but depending on the skills each employee has, a separate "skills form" will open. (there's one main form and when they get to the skills part of registration the main form hides and the selected skills form opens).My problem is when the second form opens, Access adds that data onto the next line of the table, but I want it to continue adding to the record that the main form is using.
My thinking is there must be a way of retrieving the primary key from the first form and applying that to the second one, but I can't figure out how to do this even after spending most of yesterday playing with it .
My other option is to create another table just for skills and have it added straight there, but I'm not sure if that will just make more work for me later on when writing queries and such (plus I feel like that would be cheating).
I am new to access and I recently encountered a double click issue
My form loads perfectly on double click event but it shows the first record instead of selected record.
My search is based on a PersonID but each PersonID has different WorkID that I wish to display on double click but it always shows the first WorkID instead of my selected record
I have tried changing the filters in the form properties but it still doesn't work for me.
Here's my code:
Private Sub SearchResults_DblClick(Cancel As Integer) DoCmd.OpenForm "WorkForm", , , "[PersonID]=" & Me.[Searchresults], , acNormal End Sub
[Searchresults] draws information from my Query
Query information:
PersonID... WorkID... Type......Location 1234..........1............Paint .....Address A 1234..........2............Electric...Address B 1234..........3............Floor..... Address C
When I add a record in the subform and then move to the next record whilst still in the subform, the main form jumps back to its first record? I then have to move back to the right record in the main form to update the next record in the subform.
I want to move to the next record in the subform without affecting the main form.
I have a problem with my database I have a combo box that will search for my record. Actually its working I input the specific number it goes to the specific record. But I want, if there no existing record in my database it will display a Messagebox that "No record Found" I try to put a code in a macro builder in a after update property field but nothing happened.
Expression code that it will display the msgbox if there's no record found.
the given code from macro builder is attached. I try to have an if else statement but I dont know how to not equal that giver conditional expression.
I would like to select a record from my combobox dropdown list and have that record populate in my subform. Currently, I am only able to select the 1st record at the top of the dropdown list to appear in my subform. But I would like to select any record from the dropdown list and have it populate my subform.
After I enter data into one field in a record I would like the form to save the record when I move to another field in the same record. It seems that the record is only saved when I exit it entirely. Is there a way to save a record when moving between fields in that record? Can this be done without using an Event Procedure for each field?
I have been looking for days on the net for my listbox problem. It is there and found a few, even on this forum. but when i try the solutions mentioned i am in a total loss and do not know what to change to make it work for me.
I have a form named A/B Retriever with a record source qry input AB Bins Than i have a unbound combobox with row source qry input AB Bins. This populates 8 textboxes with B through I carton boxes, stored in a bin. The user selects a Bin location from the combobox and can put a "x" in a textbox to illustrate that the box is empty. This works perfect.
Underneath the input bin and box part i have 8 listboxes that shows a query that has counted the empty boxes with the corresponding bin location. this also works. but the question from users where, If i click on a, lets say empty B-box at Bin location 12A20, they want the combobox automatically focus on the combobox with the corresponding Bin location. This is a quick way for them to delete a empty box (remove the X).
I have a form that using "Query A" as data source. The Form need add (edit) a field value before save that Query Result to another Tabel. Is it possible to do that?
The PROCESS simply like below: Tabel A --> Query A --> Form -->Edit value a field -->Save to Tabel B
if it is possible, are there some requirements that have to be fullfilled?
I have a form "IntUnderwriterSearchByName" which is based on the query "Search by Name". This form opens with a parameter (please enter name of broker) and is set out like a datasheet with the following fields- "Broker Name", "Domicile", "Broker Code" and a couple of others. I'd like to be able to click on a record and open the form "IntUnderwriterPopUp" so that the details of that specified record are displayed.
Broker Code is what I'd like the form to look for and this Broker Code is unique for every one of the 900 or so records. This code can be numerical e.g. 01233 but also can be a mixture of both e.g. EU2885. It is also worth noting that this code is not the primary key- i have an autonumber (called ID) that does this- but this field does not appear on the form.
I need to know how to auto enter the date of the previous record into a new record. I have this db for my vehicle log sheets and I submit monthly a claim for the business km from my company. I usually cant remember the date of the previous claim and have to scroll back until I find the field with a date. It will be useful if the date was copied into every new record until I edit the date when I submit the claim. What I ask is during the new month all the dates will be the same until I submit the claim. I do not know how to do this, and yes I have done a search.
I have a subform with records of call details (date, time, subject) - the date and time are autogenerated and subject is a text field. After entering text in the subject field and then clicking on the close button in the main form, or clicking anywhere else in the main form, the record is saved to the table. However, if I enter text in the subject field and then move up to view previous records (within the subform) and then click the close button in the main form the record is not saved in the table. How can I either save the record before allowing the user to move to another record within the subform or before exiting the subform set the focus to the new record so that it will be saved on exit?
The school director is going to input a date (by default today) and a subform will display all of the students who started before that date and haven't been closed as of that date. Next to each name, there will be 4 radio buttons (present, absent, holiday, hospitalized), which by default will be set to present. The director will go down the line, only needing to click when a student isn't present. At the end, she'll push a save button and the new records will be added.
My proposed method:
1. When the textbox with date input is changed, the subform (or just form and I put the textbox in the header?) will populate itself with a query based on student names whose corresponding startdate and enddate work with the inputted date.
2. The subform will be in continuous view so that it kinda looks like a data sheet but it has radio buttons rather than just spreadsheet cells.
3. When the save button is pushed, some visual basic code in the background will look at record 1, grab the student name and selected radio button value, and add a new record to the AttendanceRecords table with the name, attendance type, and date. Then the code will move to the 2nd record, rinse and repeat until it goes through all of them.
Questions/problems:
1. At its core, is this the Access way of doing something like this? Is there a simpler, more efficient, or generally smarter way of doing attendance?
2. How is step 3 going to work? I can look up how to add new records to a table, but I'm not sure how to move around from record to record collecting corresponding data.
3. Since the AttendanceRecord table uses studentID and typeID rather than actual names and actual attendance types, what's the easiest way of adding the new records with that data efficiently? I'm thinking of making the RecordSource of the subform some sort of linked up set of tables such that if I'm looking at record 1 and the name in the textbox on the subform is "Bob" I can just reference studentID in the background without needing anything on the form at all with studentID?
I have a form which has 3 subforms based on a table with a combo box. When I select value from the combo box the data on the subform changes accordingly using the 'Requery'. However, they also show the record from the 1st value of the combo box. Is there a way I can get this solved?
I have a continuous form for which the recordsource is a query that retrieves dates from 10 days in the past to 10 days in the present. I want the record with today's date to be at the top of the form. The record with the oldest date is always on top. Is this a scrolling issue? How can I get the record with today's date to appear on top?
I have been searching all day for a solution. This is my first time using Access so a lot of this goes over my head. I'm currently running Access2010. I have a form that I am using for when people take office supplies and we can generate a cost per department. All of the Tables, Query and Reports are set up already and surprising work. My form fields are:
Date Created (automatic current date) Quantity Item Code (Combo Box that shows Item# and Item Description) Initials Department (Combo Box that shows Dept# and Dept Description) RefCode Remarks
I am trying to get it to where when I enter a new record it will autofill with all fields expect "Item Code" from the previous record until I change it.
I have created three tables, all of them are connected by one-to-one relationship by same field, as you can see in the screenshot. and at the same time I have created three forms for each table. then I brought two forms in one remaining form. so whenever I entered data in first form and click on the next tab in which another form exist, it gives me this error: "you cannot add or change a record because a related record is in table".