Manipulating List From Another Form

Nov 19, 2013

I have a button in formA. When I click on it I want it to show the listB.

(To show it I used the event code: ListB.Visible = True)

The thing is, listB is in formB (which is a subform of formA).

Code isn't working because listB doesn't exist in formA, got an error code.

I tried [Form]![FormB].ListB.Visible = True

But it didn't work, I don't think I can do this in an event code.

View Replies


ADVERTISEMENT

General :: Manipulating Dates Within A Form

Mar 2, 2013

I've been tasked to create a company client record database which permits several people at once to access and modify a communal database of clients. So far, so good. It's for a firm of solicitors, so I'd better get it RIGHT!!

One field requires the entry of a date, which the next field is supposed to automatically subtract 180 days from.

Is it possible for me to do this within the one entry form? The way I see it is that the first date would be entered, then the form would automatically display the -180 days result in the next box.

View 8 Replies View Related

Forms :: Continuous Forms - Looping Through Records / Manipulating Fields On Form

May 29, 2015

I have a bound continuous tabular form,However, based on data content in one field of a record, I want a checkbox in the same record enabled, so the user can check it if necessary. I have created a record set using the form as shown below, and I am looping through each record. To show that my code is referring to the field with required data content, I display it as a message box and it works, yet my checkbox does not enable.

I have the code in the form_load event, however, for testing purposes I have it behind a button.If I am seeing this properly, the code behind the button enables the checkbox for ALL records once the criteria in the required field is true, and based on the last record, which has no data content, it disables the checkbox in ALL records. I also have the PK ID for each record hidden in the form. Can I utilize that to target the checkbox of each individual record??

Form Detail
-Form does not allow additions or deletions. Edits allowed
-All fields are disabled and locked
-I only want the check box to unlock if data is found in the "RequiredField" as referred to below. I have also tried if not isNull(requiredfield.value) then -enable checkbox, which yields the same results

Here is my code

Code:

Dim rstMyForm As DAO.Recordset
Set rstMyForm = Forms!MyForm.Form.Recordset
rstMyForm.MoveFirst
Do While Not rstMyForm.EOF
If Not RequiredField.Value = "" Then

[code]...

View 14 Replies View Related

Manipulating Calculated Fields

May 18, 2005

I developed a query that calulates when a contract is reviewed i.e 5 weeks and 9 weeks after the commencement date. These are called CDE1 and CDE2. This works well and the CDE1 and CDE2 dates are displayed ok.

The query above is:
SELECT Contract.ContractNo, Contract.APSNo, Contract.Firstname, Contract.Surname, Contract.AgencyDesc, Contract.FacilityName, Contract.Designation, Contract.WeeklyHrs, Contract.PositionNo, Contract.ComDate, Contract.EndDate, IIf(DateAdd("ww",5,[comdate])<[enddate],DateAdd("ww",5,[comdate])) AS 1stCDE, IIf(DateAdd("ww",9,[comdate])<[enddate],DateAdd("ww",9,[comdate])) AS 2ndCDE
FROM Contract;

The problem is that I now want to access contracts under these CDE dates between two dates that is user defined (startdate) and (enddate).

As the above are calculated fields, how can I develop a new query based on the above as CDE1 and CDE2 are already calculated fields?

View 2 Replies View Related

Manipulating ListWidth Problem

Sep 8, 2005

Hi all,

I have a problem manipulating the list width of a combobox. Now i set the list width property on the toolbar, as larger then the combobox for instance listwidth = 18.5cm while the combobox is about 10cm. Now i have a combobox that when clicked changes the property of the listwidth back to the size of the combobox. If the user clicks the combobox again it should return to 18.5cm but it does not seem to want to change back, even though all the other property changes work.


Here is my code:
Code:If label1.Visible = True Then Me.label1.Visible = False Me.label2.Visible = True If Me.label1.Visible = False Then Me.Combo.ColumnCount = 1 Me.Combo.ColumnHeads = False Me.Combo.ListWidth = 10 If label1.Visible = False Then Me.label1.Visible = True Me.label2.Visible = False If Me.label1.Visible = True Then Me.Combo.ListWidth = 18.503 'this does not work Me.Combo.ColumnCount = 10 Me.Combo.ColumnHeads = True End If End If End Ifend if

Where if label1.visible = true then listwidth = 18.5 else label2.visible = true listwidth = 10.

Thanks in advance for any help

M-.

View 4 Replies View Related

Manipulating Table Data From Code

Feb 12, 2005

I’m working on an Access 2002 project where I need some help with coding. I’m a neebie to Access and Visual basic so a few pointers to get me on my way would be much appreciated.

The project is dealing with logging vehicles on and off site. I have one database that contains a list of all regular traffic in three fields – Registration Number, Company Name and Type. After the last update this contained about 300 records. I called this MAINDATABASE.mdb.

I have another database that runs as a user input screen and front end called WORK.mdb. This contains the above three fields and three others, Time In, Number of Occupants and Time Out.

I have already done the coding for Time In and Time Out where the user just double clicks the field and the system time is entered. The important field is Registration Number. What I need is the following:

When a vehicle comes on site the user double-clicks Time In on the form which inserts the present time (done). The user then tabs to or clicks on Registration Number. An input box comes up where the user types the reg number. I need the code to take this input, search the MAINDATABASE database and if the reg number is found return the values for Registration Number,Company Name and Type in that row of the database and then insert those values into the corresponding rows in the WORK database. If the reg number isn’t found then a message box comes up telling the user to enter details manually and input the string entered by the user into Registration Number field on the WORK database and leave the user to enter the values for Company Name and Type. I have the code for the Input Box and the Message Box at the end!:


Private Sub REGISTRATION_GotFocus()

InputBox("Enter Reg number...")
……..

MsgBox "Registration number not found. Please enter details manually"

End Sub


I just need the stuff to do the work in between!!
Any pointers are very welcome……

View 4 Replies View Related

Forms :: Create List Box To Only Display Information From Another Form Related To Current Form

Mar 20, 2014

What I would like to do is create a list box that will only display the information from another form that is related to the current form.So I have a form call Equipment Catalog and that form is related to Equipment features 1 to M relationship and the Equipment Features is related to a Features form M to 1.

So what I want to do is display all the related equipment features in a listbox that is related to the current PK of that form.So if there is only one feature on one form the list box will only display that one item however is there is 6 features on another it will display all 6.I have been trying SQL and Queries but I still can't get it to work.

View 1 Replies View Related

Forms :: Filter List Box On Form By Using A Control On Form

Jan 14, 2015

On a form I have a:

control called "FilterListBox"
list box called "lstCustomer"
option Box called "optCustomerType"

When the user selects an option in the option box, "FilterListBox" is updated to either "1", "2" or "1 or 2"..One of the fields in the query for "lstCustomer" is "CustomerType" and its criteria is set as follows:

[Forms]![frmPrintHowCustomersPaidInvoice]![FilterListBox]

if "FilterListBox" = 1 the query for "lstCustomer" returns the correct records
if "FilterListBox" = 2 the query for "lstCustomer" returns the correct records

But if "FilterListBox" = 1 or 2, no records are returned.

View 9 Replies View Related

List Box Or Sub Form???

Nov 10, 2005

Here is my requirement:

I have a Table called "tblresource" that has two fields - Resource (Text) and ResourceDate (Date).

Date format in tblresource goes like this:

resource1 1/1/2005
resource2 2/2/2005
resource3 3/3/2005
resource4 4/4/2005

I have a form where I need to show the list of all available resources on the left side; a button in the middle; and a list of all selected resources on the right side. The button in the middle should be able to shuttle the resources from Left to Right or Right to Left.

All the resources selected in the right side should be associated with this particular form record.

Also, if I delete any particular record from tblresource manually - This record should be automatically deleted in the Left and Right side boxes.

Can anyone point me in the right direction please? Thanks!

P.S. I tried searching for this topic in listbox and subform but could not hit on a particular topic that addresses this need.

View 2 Replies View Related

Need Help With A List Form

Feb 19, 2006

Well I've tried several things to no avail. Maybe someone can see what I’m unable to see. My form frmAddSpool keeps giving me an error message. And i don't know what it’s looking for.
Maybe someone could look at this and give me a hand figuring it out.
I have attached a copy of my data base for reference.

View 2 Replies View Related

Loading A Form From List Box

Apr 14, 2006

Hello All

I have a list box that displays the names of customers who are allowed to hire DVDs.

I would like to highlight a customer and show all the relevant customer data on a separate form, not have the list box on the same form that displays the customer's data.

Regards
Terence
London

View 2 Replies View Related

List Label From Form

Jul 19, 2005

I want to display the all the labels for a form in an other form. Is this possible.
Basicly have a drop dow box that has all the forms in it and then based on the combo box list the label for that form.

View 14 Replies View Related

Limit List Form

Apr 7, 2005

I have a form, which lists all reports i have available in my dateabase.
But there is 1 report which i dont want visable to users, how do i restrict access to this 1 form, either by it not showing on the list or password protecting it.
users have to double click the report name to open it from the list.

TY in advance

View 10 Replies View Related

List Not Updating Form

Aug 8, 2006

hi guys i have a list box which has 4 columns that come from a query. when a user double clicks a selected item, i want the frmUPdate to open with the selected item; it gives me no error it just always goes to the 1st contract . have no idea what else to try...

here is the code:


Private Sub List33_DblClick(Cancel As Integer)

Dim rs As Object

DoCmd.OpenForm "frmUpdate"

Set rs = Forms!frmUpdate.Recordset.Clone
rs.FindLast "[ContractID] = " & str(Nz(Me![List33]))
If Not rs.EOF Then Forms!frmUpdate.Bookmark = rs.Bookmark


DoCmd.Close acForm, Me.Name

End Sub

View 5 Replies View Related

FORM HELP!! With Drop Down List

Sep 8, 2006

I'm pretty much a noob to visual basic, I've only taken C++ so I dont really know VB language. ok here is my question... I have a form and I added a drop down list through a table. What I want it to do is output into another text box within the same form when an item in the drop down list is selected. I think I have to make an event procedure for the "On Click" or "On Got Focus" selection. please help me out !!

View 5 Replies View Related

Open Up A Form From A List Box

Nov 2, 2006

I have a form with a list box on it, I want to be able to open another from with a click on an item in the list box and populate a list box on the second form.

So lets say on the ist forms list box I have Beef, Pork and Lamb, if choose Beef, I want to open the new form and populate the list box with a list of Beef items. Any help is appreciated.

View 1 Replies View Related

Refresh A List Box From Another Form.

Nov 1, 2004

Currently I have a Tabular view List (of text boxes) populated from a query.

What I am looking for is a way to refresh the list. I presumed me.refresh, me.requery or me.repaint would work, but it doesn't.

If I open, then close the list it refreshes. So presumably I could close then open form for an update, but that is crude and there must be a way to do it properly?

The user navigates between two windows (client list *name and age*) and (Client info *in depth info and history*) they click on a record in the list and are taken to (client info) whereupon they can edit or add a new record. The records that are updated do so without a hitch, however the new records do not update in the list.

Paul

View 1 Replies View Related

Requery List Box From Another Form Vba

Apr 24, 2008

I have a main form....I click a button on this form and another form opens...an edit is made....(BOTH MUST BE OPEN)
WHen I close this form I want to Refresh a List box on the Main form to reflect this edit.

I am trying this with no success

MainForm.SubFormName.Requery

MainForm.SubFormName.Refresh

What am I doing wrong????

THanks

View 2 Replies View Related

Updating Form List

May 28, 2007

Hi,

I'm new to access, but not new to databases in general. I'm having what should be a common problem/question, but I cant seem to find much on it.

For example, I have a standard table, with ID, text and a "yes/no" (lets call them booleans). I've made a query for that table - of only records with the boolean to no.

I have a form which displays the query. If it i put the boolean to yes, it still stays on the list until the form is opened and closed. This could be useful but if I want it to do it right away, what should I do? I didn't see any simple VB or macro command anywhere. Should i script open and close? Use a SQL command to update.

thanks

View 3 Replies View Related

Drop Down List In A Query Form...

May 31, 2006

I'll admit from the start that I'm a newbie at Access 2003 and I've tried looking in the help file and internet searches. But I've become stumped on how to create what I'm looking for.

I would like to create a form that performs a query that has drop down menus with info from each specific column in a table. That way I don't have to necessarily need to know off the top of my head what data is entered in that column, but can click the drop down menu and get all of the data listed in that particular column. Once have a particular set of info selected, then have a button like "submit" and then the query results appear in a form and click through each page or results.

Is this possible?

View 1 Replies View Related

Set Field In Query As Value In List Box In Form

Jun 21, 2005

:confused: I've tried everything I can possibly think of to get this to work. I've also looked at other threads and I still couldn't get this to work. The code for the list box in my form is Forms!Display_Engineering_Jobs_Report_Inputs!Repor t_Column1. I am trying to set the value in this list box as the input for the field on my query. This value also corresponds to a heading within a table I have. The information under the heading in this table is what I am trying to show in the query. Please help! Also, I'm pretty new to Access, so explain it as if you were writing a page in "Access for Dummies." Thanks!

View 9 Replies View Related

List Box Selection Carried To Another Form

Jun 15, 2005

I have searched the forum and just can't find an answer. I'm hoping someone can point me in the right direction.

I have a main form with a combo box that links to a table called tblSTC. There are however hundreds of records to choose from. To make the serach more simple for the user there is a button next to the combo called 'Search', When the user presses this a new form pops up with a text box and a list box (the list box contains all records in tblSTC). As the user starts to enter text into the textbox an AfterUpdate event limits the records displayed in the list box to match the criteria of what has been entered in the text box.

When the user identifies the entry he/she wants to select from the list box, I want the functionality of being able to double click the entry, the popup form close and the selection populated in the combo box.

I know that this is probably just simple code using the List Box double click event. I am however unsure how to go about it. Do I need to use some kind of Insert statement??

View 3 Replies View Related

List Box: Populating Table From Form

Dec 5, 2005

Hi,

I have a form with various list boxes that display options based on a query. When options are selected the text relating to them is populated in a seperate text box at the side.

The problem im having is when I select options from the list box I want it to store the selected options in the table that holds each record when the form has been filled out and submitted. At the minute it populates everything into the table apart from the options selected from the list boxes.

Does anyone know how to do this?

Thanks in advance

Edit: I have got the control souurce of the list boxes set to the correct field in the table.

View 8 Replies View Related

Mutiple Option List On Form

Jun 21, 2006

Hi,

I have the following say;

tblProducts:
Name
Categories
Price

tblCategories:
Name
IDNumber

at the moment, no relationships built

tblProducts "categories" requires the IDNumbers of the categories in tblCategories - there are mutiple IDNumbers for each product, and they need to be seperated by a comma - for example ProductA has categoryIDs 1,3,6 (where categories 1,3,6 and called A,C,F)

At the moment, I am having to manually look up what each categoryID number is by CategoryName, and then type it in the tblProducts category field.

I want to have a form which provides the tblProduct "Name" and then a long list of all the tblCategory "Name" contents as option (or tick) boxes. So all cateory Names listed.

Then when I tick mutiple boxes on this form for the categories, it populates the tblProduct "Categories" field with the tblCategories "IDNumber" codes, with a comma between each one! (so the names chosen actually populates with the ID number)

So basically if on my form, ProductA has category A,C,F ticked -- so the field tblProduct "Categories" is "1,3,6" (where 1,3,6 are the category IDNumbers and A,C,F are category names)

In other words, I want to be able to choose the categories for my products by choosing the Category Name (rather than ID) but having the ID populated into the relevant field -- I can do this with a combo box displaying a different field to that thats populated....but this only allows one selection....

I want mutiple categories to be chosen (via the form with option/tix boxes), and thus to populate the relevant field with commas seperating.

Is this last bit possible?!!

How!

thanks in advance
rob

View 1 Replies View Related

List Box Open Form New Record With The ID In

Aug 15, 2006

Hello everyone,
i have 2 tables,
table one =client detials
table two = job information
both have field called ClientNumber in them and have Relationships

i have a form with list box in it with ClientNumber(hidden), Surname, First name and i have a button and i want when i choose a name of list box and click button to open a job information form and be on new record and i want the ClientNumber to be put in the ClientNumber textbox on the form

so if u click on eg: David scown and click button want it to open form and be on a new record and put his Client Number in the client number text box

View 4 Replies View Related

Coding Problem With Form List Box

Oct 20, 2004

I have several list boxes, and each is populated using a query source. I want to make it so that when you double click a given entry it pops up either a form or query that says more information on the item.

Each list box is populated using two fields from the query a name and a number.

Example


Item A | Value A
Item B | Value B
Item C | Value C


I want it so if you were to double click Item A a form opens with the rest of the information
so a text box or whatever with the following

Item A Value A AnotherValue A Etc A ....

Basically I want to be able to pop up a single line of the query based on double clicking of the list box entry.

This is what I have so far in code:


Code: Private Sub prospectLW_DblClick(Blah As Integer) Dim varItem As VariantDim strPlayer As String strPlayer = Me.prospectLW.ItemsSelected.Item(varItem) MsgBox strPlayer DoCmd.OpenForm ("Popup1") End Sub

The trouble I am having is getting the value from the listbox if I can get say Item A when you double click it ignoring the other info I want just the name of "Item A" so that when I open the form I can use that variable to filter the form I made that is basically just the query within a form. I hope that is enough information if not let me know I can add more.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved