Combo And Text Box Display Question

Jan 21, 2007

Hi all

Go nice and easy on me. This is my first serious DB and i've picked a cracker to start with.

Basically i am trying to set up a booking system for excursions, booking seats on coaches, trains, printing tickets, vouchers and information.

At the moment I'm trying to populate a text box (txtExcursionCost) in a form with a cost with is drawn from a table (tblExcursions).

tblExcursions holds information about the excursions including the info which populates combo box (cboExcursionTitle) and combo box(cboExcursionDate). The date combo is dependant on what is selected in the Title combo. The text box (txtExcursionCost) needs to be dependant on the Title and Date combos to get the right cost displayed. How could I get this to work?

The reason for the text box is that it only needs to be displayed to show the user the cost of that particular excursion and to create a base for a calculation for Amount Due at the completion of the transaction.

Hope this makes sense.

All help greatly appreciated thanks.

Snab

View Replies


ADVERTISEMENT

Modules & VBA :: Display Text Depending On Combo Box In Different Form

Aug 6, 2013

I want to display the text from one combo in a text box in another form based on what's selected in a second combo box. The text box is in a different form from the combo boxes.

Sub D_ComponentTypeCmb_Change()

If Me.D_ComponentNameCmb.Value = "Customise" Then
Forms!CustomComponentF!C_ComponentTxt.Value = Me.D_ComponentTypeCmb
Else
Forms!CustomComponentF!C_ComponentTxt.Value = ""
End If
End Sub

View 13 Replies View Related

General :: Auto Populated Text Boxes To Display Rows From Combo Boxes

Jan 25, 2015

I have strange issue when creating auto populated text boxes which displays rows from combo boxes.

In one database auto populates works with simple text box Control Source edit "=[ComboName].[Column](NumberOfColumn)".

Somehow same method doesn't wotk in different database: here one time I have to insert VBA code at On change Event:

Me.TextBoxName = Me.ComboName.Column(NumberOfColumn)

And other time it wont work with On change but only with After Update Event (code is same).

Another thing this morning happens was that when I tried to add new record trough form where combo box and tex boxes are located, MS Office suddenly stopped working after selecting combo box selection (with message Microsoft Office has Stopped Working). It is 2013 version.

I got it work after deleting and re-inserting VBA code to autopopulate text box at After Update Event.

View 3 Replies View Related

Forms :: Display Row Text From Subform Column In Unbound Text Box Of Main Form

Jan 6, 2014

My database has Main form and a Sub form. On main form i place one unbound text box named investigations. In subform of which datasheet there is a column named TestCode. I want unbound text box (Investigations) to display row values which selected in a column (TestCode) of subform.for example:Investigation field should display "CBC,HB,ALP".

View 5 Replies View Related

DLookup To Display Date In Text Box On A Tab Control Where Criteria Is Text Field

Apr 15, 2014

I'm trying to pull a date from a table into a text box on a form tab control using DLookup and I just can't figure out what is wrong with my DLookup expression:

=DLookUp("DateOrdered","tDateOrdered","PrNumber=" & [PrNumber]) ----- (DateOrdered is short date, PrNumber is text, db is split Access 2013)

Whats missing in this expression? I've tried every criteria variant I could find but to no avail.

View 9 Replies View Related

On Got Focus - Hover Over Text Box And Display Text In Another Textbox

Jun 18, 2014

When I mouse over TEXTBOX1 I want it to display the phrase Hello World in TEXTBOX2.

When the Mouse moves away from TEXTBOX1 I want TEXTBOX2 to go back to normal.. (Empty)

How can I get the below VB to work? Or something similar.. I'm assuming a mouse move event or something

Code:
Private Sub TEXTBOX1_GotFocus()
​ Display Hello World in TEXTBOX2
End Sub

Code:
Private Sub TEXTBOX1_LostFocus()
Clear TEXTBOX2
End Sub

View 1 Replies View Related

Display A Text Box On A Condition Of Another Text Box

Dec 6, 2006

I am trying to run a IF, THEN expression.

What I have created is :

Private Sub Form_Open(Cancel As Integer)

If Me!Type = "Workboat" Then Me!DWT.Visible = False
End

This works fine but where the TYPE field is enetred as another category other than workboat, the DWT field is still missing. Am I missing the Else part?

Please help!

View 6 Replies View Related

Forms :: Fill Text Box Based On Combo Box (not Using Columns In Combo Box)

May 21, 2014

I'm looking for a way to have a text box auto fill based on the selection of a combo box on the same form. I cannot use the method i find all over the internet of using multiple columns in the combo box and basing the text box on that because the combo box already has multiple columns being used to determine its own possibilities and other combo box possibilities.

I would really just like the text box to work like this, but im still kinda inexperienced in VBA...

If combo box is "F004-001", then text box is "237"
If combo box is "F004-003", then text box is "280"

I know how to add in an "after update" thing, but i do not know how to do If/then statements.

View 1 Replies View Related

Combo Box Display 0

Oct 1, 2004

I have combo box # 1 with value list of "OLD" and "NEW" and combo box # 2 with its row source coming from a query. Here's the scenario - A user chooses "OLD" on the first record from combo box # 1 and the code works fine. But when the user chooses "OLD" again on the next record, what code do I write so that combo box # 2 displays a 0?
So to re-itirate, please help me write the code if the item on the list is selected again, the value of the other combo box would display 0?

Please help. Thank you.

View 7 Replies View Related

Combo Box Will Not Display Selection

Dec 14, 2005

I have a form that calculates freight costs. I'm using a combo box for the user to select the route of the shipment from shipping port to destination port. The combo box has 2 fields. The index which is stored in the database and the description which is displayed to the user. I used the wizard to create the combo box and set the index to be saved in a table. Everything works fine, the freight cost is calculated correctly and the data is stored as designed.

The problem is when if the user goes back later and opens the screen to view the freight information, the combo box doesn't display what was selected previously. Therefore, no freight is calculated and the user has to reselect the combo box again. When I check the table, the index value of what was selected is in the table, but it will not display in the combo box.

. . . . Additional info to this post. . . . The combo box is set to use a data from a standard table. The user can only select what is displayed in the list. However, the index is then stored in another table after the selection is made. I want the combo box to do something like, if a selection was previously made then displayed what was select, if not, then display the data from the standard table.

What did I do wrong during the set up? Thanks for your help solving this problem.

Jeff

View 1 Replies View Related

Help With Combo Box Display Problem

Jan 6, 2006

I need some help please
I have a db that has three forms (1 frmSearch, 1 frmFindCountyInfo and 1 subfrmFindCountyInfo (embedded in the frmFindCountyInfo)
I also have 2 tables (States and CountyInfo with StateID and CountyID set as PK in each).
Now I am trying to design it in such a way that when someone double clicks a State from the Mainform (FrmSearch), it should bring the frmFindCountyInfo with the corresponding state info for that State and this works fine.
Now in the subfrmFindCountyInfo, I want the user to be able to pick from a combobox a county within the Counties from the state selected and displayed in the frmFindCountyInfo
Data Source for FrmSearch: States
Data Source for FrmFindCountyInfo: States
Data Source for SubrmFindCountyInfo: CountyInfo
I also have a one to many relationship defined between StateID in States table and StateID in CountyInfo Table (I dunno if I am using it right though)

I have a query that works in Datasheet view but when I run the form, it picks just one county and there are non on the droplist.
Any help will be very much appreciated. Here are my queries…
Query to get State and Corresponding Info (works Fine)

SELECT States.StateID, [State] & " " & [Alias] AS StateFullName, States.Alias
FROM States;

Query to get County and corresponding data (seem to work in datasheetview but pulls up just first alphabetical county in combo box on form)

SELECT CountyInfo.County, CountyInfo.ReleaseFee, CountyInfo.ReleaseComment, CountyInfo.AssignmentFee, CountyInfo.AssignmentComment, CountyInfo.AdditionalInfo, CountyInfo.LastUpdated
FROM CountyInfo INNER JOIN States ON CountyInfo.StateID = States.StateID
WHERE ((([Forms]![FrmFindCountyInfo]![State])=[CountyInfo]![State]))
ORDER BY CountyInfo.County;

Also when I run subfrmFindCountyInfo alone ( I have to input State) it has the drop down with all the counties.
I dunno whatelse to do. Any help willbe very much appreciated.

View 8 Replies View Related

Combo Box Display Different Than What's Going In Record

Jan 24, 2006

I have created a combo box that simulates browsing, but limits it to a single filepath. I would like to store this file path along with the filename into my database in a field. There are two ways of doing this that I have found work, but i need a less cluttered way. 1) My rowsource string is created byrowString = rowString & filePath & fileName &";"fileName = dirthat's in a loop that reads all the files in the directory.... the problem with setting this rowsource to my combobox is that its very long and cluttered looking combo boxMy secont way is: rowString = rowString & fileName &";"fileName = dirThen i make a hidden text box whose value is filePath + Me!cboBox where the cboBox has the string value of the file (Sample1.jpg) In this instance i make the text box the control source instead of the combo box... but I'm pretty sure that's a bad way of doing what I want to doboth of these ways seem ... redundant, so i was wondering if there is a way to do this otherwise ?

View 3 Replies View Related

Combo Data Display

Feb 2, 2006

I am fairly new to VBA, having done no fromal training. I have taught myself quite alot and I am pleased with how i am progressing. I am stuck though!

I am building a booking system for a friends business, all free of charge as I believe it's a good project to get experience in VBA.

The booking form has a 'Date' Combo box, 'Name' Combo box and a 'Time' Combo box. The 'Time' Combo box displays times in 10min intervals from 0600 to 2100, and this data is stored in a table called 'tblTimes'. I need to build a query that checks the main table 'tblBooking', for a selected date chosen in the 'Date' Combo box by the user, to see what times have been used up and thus only display, in the 'Time' Combo box, those times not yet used for that particular datedate.

I am sure, to some of you experts out there, that this is quite a simple query. I looki forward to your input.

View 6 Replies View Related

Using A Combo Box To Display A Table

Jul 7, 2006

I'd like to be able to select a choice of printer manufacturer(as a combo box), which will then display all the printer cartridges made by that manufacturer in a table below the combo box. I have made the forms (with the relevent combo box looking up manufacturers) but am now sure how to relate the two so that the table updates, depending on which manufacturer is selected. Again this seems like a simple problem but I am new to access and sitll working my way around the program.

(Yes, I have tried goodle, but I can't seem to find quite what I'm looking for)

View 1 Replies View Related

Using A Combo Box To Display A Table

Jul 7, 2006

I'd like to be able to select a choice of printer manufacturer(as a combo box), which will then display all the printer cartridges made by that manufacturer in a table below the combo box. I have made the forms (with the relevent combo box looking up manufacturers) but am now sure how to relate the two so that the table updates, depending on which manufacturer is selected. Again this seems like a simple problem but I am new to access and sitll working my way around the program.

(Yes, I have tried goodle, but I can't seem to find quite what I'm looking for)

View 3 Replies View Related

Display Qry Results In Text Box

Apr 17, 2006

Hello Experts,
i have this small problem with my qry results not being displayed in the text box.

tbl Issues= status field and many other fields
tbl Status= Active or Closed

here is my qry
SELECT Count(Issues.Status) AS CountOfStatus
FROM Issues
GROUP BY Issues.Status
HAVING (((Issues.Status)="Active"));

I have tried typing this code on the control source of the text box
=DCount("PartNumber","Issues","Status=Active")
but it doesnt work.

All i want to do is display my results in a text box on a form.

Any help
Thanks alot

View 2 Replies View Related

Display SQL User Name In Text Box

Sep 27, 2006

Hi,

I have ADP project + SQL Server Express.

I need display in Form textbox User Name (with then I log into SQL Database).

Thank You in advance for answers.

View 2 Replies View Related

Can't Get Text To Display On AfterUpdate

Dec 14, 2005

Hi

I'm having problems trying to get an If statement working on my form.
What I have is a form with two combo boxes linked to a Calendar when you click on the arrow. I can get the dates I select from the calendar into the combo boxes which works perfectly.
What I wanted to do then was create a textbox to list the number of days between each date.
I have created an If statement for me to do this, which works fine.
The problem I am having is that it doesn't seem to update these changes on the form after the date has been changed.

I have placed the code in the AfterUpdate event on both of the combo boxes and also in the Form Current Event.

Anyone any ideas?

If you want to see the If statement let me know, but I don't think it's that.

Thanks

View 2 Replies View Related

Text Box Content Won't Display

Dec 7, 2006

Here's a strange one.....

We have only 4 computers in our office. Our DB backend is SQL server and due to constant corruption of the database from multiple users, each user/computer runs its own separate copy of the mdb file.

I have set up a small form in a separate database to allow me to quickly compact the DB and copy it to the 4 locations on the network instead of doing it manually. This process works fine...BUT....I have a text box on the form set up to display the copy progress and the contents of the text box do not properly display during the file copying. Even though the code to change the value of the textbox comes before the file copy command, the textbox will not display the until after the copying is finished. However, when I step debug the process it displays the information correctly before the file copy command executes.

Here is a sample of my code...
Dim strPath1 As String
Dim strpath2 As String

strPath1 = "C:FortuneSystemTemp.mdb"
strpath2 = "\ScottFortune"

If Dir("C:FortuneSystemFortune_System.ldb") <> vbNullString Then
MsgBox "Cannot proceed! Fortune database is open.", vbCritical
Exit Sub
End If

txtProgress = "Compacting Database"
'compact master DB to a temporary DB file
DBEngine.CompactDatabase "C:FortuneSystemFortune_System.mdb", strPath1
txtProgress = ""
If chkTed Then
If Dir(strpath2 & "Ted.ldb") <> vbNullString Then
MsgBox "Ted cannot be copied. Program is running.", vbCritical
Else
Screen.MousePointer = 11
txtProgress = "Ted Copying"
Kill strpath2 & "Ted.mdb"
FileCopy strPath1, strpath2 & "Ted.mdb"
txtProgress = ""
Screen.MousePointer = 0
End If
End If
....etc...


Can anyone explain why this is happening and possibly a way around it?

Thanks

View 2 Replies View Related

Get Last Record And Display In An Text Box

Mar 18, 2008

I have a Text Box called: VNo , and a table called: DocControl.

The Table contains this information

Name........Version............Date
-------------------------------------------
GFD v0.1 09/03/2008
GFD v0.2 11/03/2008
GFD v0.3 12/03/2008
TRD v0.4 13/03/2008
GFD v0.5 14/03/2008

I want the Text Box to display the last value in the Version Column, which in this case is "v0.5"

Any help thanks?

View 1 Replies View Related

Forms :: One Combo Box Based On Another Combo Box And Text Box Uses

Jun 4, 2013

I have been creating a form, based on only one table. Here I am displaying data as text boxes and subfrom from the same table. At the beginning, I was interested in controlling the display of the data according to the combo box (in this case is the PO number). Now, I would like to add another combox box which is the year (I have a column with the date, and also I have a column that shows only the years digits in my table) Also, I have a subform that display the data from the same table specifics records that I want. It means that I want to pick the year first, and then in the combox box of po number shows only option of that year, and hence the text boxes and subforms change accordingly to the two combox boxes.

View 2 Replies View Related

Display Dat On Basis Of Combo Box Selected Value

May 31, 2006

Hi

I am posting this question again, as I think there was some miscommunication from my side. I sinccerely apologise.

Actually there are three fields on a form.

1. Combo Box : Label is Name
2. Text Box : Label is Code
3. Text Box : Label is Department.

These three fields are stored in the table.

I wants that when the form gets loaded, then in the combo box field all the names from the table should appear. When I select the particular name from the list and the focus is lost from the combo box then the two values from the table should show the corresponding text boxs.

Thanks in Advance

View 3 Replies View Related

Display Dat On Basis Of Combo Box Selected Value

May 31, 2006

Hi

I am posting this question again, as I think there was some miscommunication from my side. I sinccerely apologise.

Actually there are three fields on a form.

1. Combo Box : Label is Name
2. Text Box : Label is Code
3. Text Box : Label is Department.

These three fields are stored in the table.

I wants that when the form gets loaded, then in the combo box field all the names from the table should appear. When I select the particular name from the list and the focus is lost from the combo box then the two values from the table should show the corresponding text boxs.

Thanks in Advance

View 1 Replies View Related

Display Combo Box Before Running Query

Mar 14, 2008

Hello I have Supply order Database
I want to display combo box
after selecting the month the query will run

plz tell me how to do it.......


kindly reply

if any 1

thanks

View 3 Replies View Related

Default Display On Combo Boxes

Aug 24, 2005

Is there a way to force a combo box to display the first value in the list as its default value?

To be more specific the combo box needs to display this value when the parent form is opened or when you use VBA to change or add the row source.

When ever I use a saved query as the row source the default value is always Null.

Thanks Everyone,
Joe

View 3 Replies View Related

Combo Box - Trying To Display Two Fields Unselected

Dec 28, 2005

I am trying to display two fields when the combo box is unselected.

Basically I have a table source manufacturer. This table has Manufacurer e.g. Nokia. Model No e.g. 3230.

So on the combo box i want it to show Nokia 3230. Saves me linking to a subform to show the information.

Can it be done???:)

View 4 Replies View Related







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