Remember The Selected Record - Requery - Then Go Back To Selected Record...
Jun 28, 2005
Hi guys,
Bit of a problem I'm hoping someone can help with. I have a telephone call logging system. The system is a tabbed form with each tab representing a person's Telephone Call Inbox. As new calls are entered into the database, they appear in each person's inbox until they are marked as dealt with.
This all works fine and there are no problems with the basics of it, but the problem I do have is that after I have split the database into a Back end and a Front end and distributed the Front ends to each user, when a new call is entered it doesn't appear in the persons inbox until they do a requery.
At first I sent the form to requery using the ontimer event, but the problem I have is that after every reqery the form goes back to the first record. A user on the office forum suggested I use the following code:
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 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
I'd like to put a command button on a form that would run a designated report but have the option of only printing selected records. I know I could just use the File/print option using selected records but that only prints the record fields displayed in the form. I want to run a special report that formats and prints more of the records fields. The problem is how have that report print the "currently selected" record or records.
I am trying to put in code in the Exit event of the subform to get the value of the selected row. I have been able to get the selected row using ".Current Record" but am not able to get the row value using it. Say, the subform fields are Id, Name and Address and I want to show the value of Address for the selected row in a msgbox.
I have a form which contains two sub forms. In the first subform I have 4 fields of Cut#, Size, Quantity and Style. Once the cut# is selected, a vba code runs and fill in the rest of fields. In second sub form I have a field of Fabric# (Combo Box) which should be restricted to the Style value on the first sub form. I have a query which contains the Fabric# and Corresponding style and I try to write a vba code to requery once Style value changes.
Ok I have a db that list stats for many of NFL's Great players. I have created a form with a drop down combobox that list the players. The rest of the form displays the stats for that player. I have linked two forms with a command button. I was hoping that I could use another command button in combination with a macro that would allow me to send (just the displayed record) to a text file. I have tried using a macro with OutPut To but it sends the entire table to text.....Please Help Me I have been working on this for Two DAYS...... :eek: HELP!!!!
However on the form, LineMachine is taken from the tblLineMachine where LineID and MachineID are FKs. This has a large list of machines as one line can have many machines and a machine may appear on more than one line
So on the form, i would like to select the LineMachineID by inserting fldLineID (which would be a combo box) where the user could select which line e.g. Line1 and then the combo box for the LineMachineID would only display the relevant machines for the entered line instead of all the machines for every line.
I managed to achieve this,but I am experiencing a problem where if, in the Line combo box, i choose a different Line e.g. Line2, the LineMachineID does not then display the machines on Line2, but keeps showing the machines for the line I originally selected (Line 1).
How do I get the LineMachineID combo box to update every time a different line is chosen in the LineID combo box?
I am trying to create a table of help messages and display them help in a form. Using MSAccess.
Each Form used will have a help button, that runs a macro "mcrHelp.xxxxx". This macro should select the relevant record from the table to display in the "Help Form".
I have a form that updates records. When the user opens the form in data entry mode, it is too difficult to find the correct record. What is the most efficient and simple way to have the form open to a specific record?
Solutions I have considered are a popup form that the user will enter the equipment code (which is the unique identifier of all records). Also, the user may not know the record number, but they will always know the equipment code (which is a field in the "equipment" table).
But I am not sure of the best way/best order to do this.
User asked why the circle with a line through it appears next to a selected record. We've been having network connectivity issues and the db is stored on the network. Is the symbol and the network issues related?
Is it possible to duplicate a record with selected fields, to be copied into a new record. ie if there are 10 fields, i only need 8 of them (no need for timestamp field etc form existing record).
I suspect this is probably rather easy, but I've not been able to figure it out:
I am using a combo to select a record in a form. This works.
The problem is: When I navigate through the records in the form, the combo box does not "update". I need to be able to change the record displayed in the combo box as the record in the form changes.
I'm this is a simple issue. I have a combo box which can have the following status's: Not Started, In Progress, Complete. Depending on the value of the combo box i want a different image to show. So if not started is selected i want the user to see a red box. If Complete is chosen, a green box will show. i can do this easily enough but my problem comes in when i go to the next record. The boxes just stay visible regardless of what option is displayed. What event is triggered when you go to the next form?? Form Open / Load doesnt seem to work. :mad: :confused:
I have a listbox on a form that show all Files for a particular volunteer. I have an "Edit File" button below the listbox to be able to edit that particular file. Is there a way about opening that form to that specific record without using a query?
I have created a form, which extracts records from a table and displays them in a list box. This works, but what I want to do next is highlight a single record in that list box, click a button and have the record open in another form. This is the code I have at present:
Private Sub DisplayEnquiry_Click() On Error GoTo Err_DisplayEnquiry_Click Dim dispCriteria As String
When I try this I get an error "The OpenForm action was canceled. You used a method of the DoCmd to carry out an action in Visual Basic, but then clicked Cancel in a dialog box."
I've double-checked that I've typed in the correct names etc. so I am at my wits end! Can anybody help me out? Thanks
I am new to the scene, please forgive me if my question or language seems silly
I have this Access 2000 database filled with over 1500 records of people I need to send these people letters based on their age and gender
I guess I would normally do the gender thing with a mergefield in Word, it'll simply create "Madam" or "Sir" upon an if...then instruction on genderdata in the database. The problem is, there's not two, but there's three options! I'll explain below.
The first option is for kids < 12 y The second option is for kids > 12 but < 18 AND their parents The third option is for adults (>18)
So, in fact there's three letters.
Now, what I need a code -or at least the concept- that will tell the database to select and open the right letter by pressing a button in a form.
I can of course make three hyperlinks in the form, one for each letter, and let the user choose, but that's not too fancy is it?
I want the database to make the choice. So, I guess in normal language the instruction needs to select the current record, analyse the age (date-dob) and, depending on the result of that calcultion, it needs to open the correct document in Word.
But here's the point: I'm quite unfamiliar with VBA code
I have a bound form (splitform view) with the code
"DoCmd.GoToRecord , , acLast"
on the Form_Open event. When I open the form it does go to the last record and shows all the data that are in (some of the) fields. I cannot however manipulate the record until I click on the navigation buttons in the bottom of the form. It also doesn't show which record ("34 of 34" for example) is selected.
How I can get it to open the last record and let me manipulate it directly on open?
I am trying to get a report to print out one one record that I want.. I want it to be able to be sorted by date and the user just picks a date and one record is printed out on page. Right now every record that is stored is being printed on a different page and over time that is going to be a lot of paper... I want to be able to pick which record I want printed...
The Form is called "Bread Mold" The report is called "Bread Mold Report" The table is called "Bread Mold" What it is sorted by is called "Swab Date"
I have a simple form in datasheet view in Company Name sequence. By default it starts the list at the beginning. I would like to put a combo box in the form header that pulls down the companies to allow the user to select the starting company to list. I don't want to go directly to the selected company, I just want the list to populate starting with the selected company. I can create the combo box and I know I use the After Update event to get the selected value, but how do I restart the list. Ideally, I would still like the operator to be able to scroll up and down after the list is redisplayed starting with the selected company.
Is it possible to have a query that will requery value of a check box based on which check box is selected? I have a form that has 5 check boxes and a text field for populating a unit price. When someone clicks a specific check box, the text field should display the unit price. I know how to accomplish this using a combo box and don't want to change the form to setup for a combo box, but rather use what everyone is currently used to. I want to add the check box is from 1 table linked to a form and the unit price is from another table not linked to a form. Both tables have 2 fields in each that will relate.
One last one that's been niggling me - I just can't fathom the code... I bet it's very simple...
I have a Form ("frmJobSummary") that shows all the jobs for a customer - the customer is selected and the Customers ID is stored in a Control called "CustomerID" (It's just a number)
I have a button that opens up a new form... "frmEditJob" This allows you to add a job to a customer. I know how to get it to open up as a new record... but...
How do I get it to open up as a new record (or job) for the customer selected on the form "frmJobSummary"?
Here's the code so far... all it does is open the form with the Current record. :(
Your help is, as always, most appreciated!
Private Sub OpenNewJob_Click() On Error GoTo Err_OpenNewJob_Click
Dim stDocName As String Dim stLinkCriteria As String
For school I have to make a application in access how to delete a selected record in the table in a subform by using a button. The subform is in the main form and the button is also in the main form
i have a combo box, which looks up a list of school names from my main table. The user selects the desired school, then clicks the button underneath, which opens a report. What i want the report to show is the next 31 (that is how many fit on one page) schools AFTER the school that the user selects - the underlying query for the report has them in alphabetical order. There are ~250 schools in the list.Even if i can get it just to display the records after the selected one on the form, that would be fine.
Now the fundamental point of my Database is to take bookings, calculate the costs and print out the bills.
It all works jim dandy...BUT I havent done it in a elegant way.
So I just want to streamline the database and make it more user friendly so my Dad could also use it.
I have a Switchboard with Buttons which functions as Navigation and below that I have a subform which is based on query from my Bookings table to show my current, future bookings etc.
I want to be able to click on a record in the subform and press a button to open the report in print preview mode without having to input the booking nr.
Funnily enough I have actually found an example database which has this function but its more complex (it does it in 2 stages, so the user can still input more data in the report if required) rather than going directly to the print preview. I looked through the settings but its difficult when you dont really know what to look out for.
I have tried 2 things so far:
-Creating a macro with the OpenReport command but when I ran the macro it still wanted the Booking Nr manually inputted. - I tried a VBA code but that gave me errors and I wasnt able to debug it.
I read some things regarding the "Link Child/Master Field" but I dont know if I even need that...I *think* that is more for pulling info from the Master form to show the related data in the subform.