473,770 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Display table record field in form

135 New Member
Hello

I have a table (BOM TOTAL L1 V1) created by a query which only contains one field (TCL1) with ONE record. I've been trying to display this record on a form (either in a textbox or a label) so i can them make some calculations with this number but i CANT!!!

I have tried different things and nothing.

I get error "#Name?" when entering =[BOM TOTAL L1 V1]![TCL1] on the unbounded textbox.

Should the textbox or label be BOUND??? UNBOUND???

Can it be done with any control property or has to be done by code???

Any other possible way arround it?

What im trying to do is to create a form where the user will enter some information (margin %, R&D costs, taxes, etc.) which will be used with the "TCL1" value in order to ger a TOTAL PRICE.

HELP!!!
Sep 13 '07 #1
6 5312
MMcCarthy
14,534 Recognized Expert Moderator MVP
Try setting the control souce as follows:

=DLookup("[TCL1]","[BOM TOTAL L1 V1]")Keep the textbox unbound.
Sep 14 '07 #2
Gilberto
135 New Member
Try setting the control souce as follows:

=DLookup("[TCL1]","[BOM TOTAL L1 V1]")Keep the textbox unbound.
Thanks it works perfectly.

I just have a last question.

Does "[TCL1]" has to be stored in a TABLE??? (this is actually a make-table query result) can it find the record from just a query? so i dont have to create tables for every single field i need?

Also, can it find the value from a FORM (a calculated field) istead of a table?

Thanks again,
Gilberto
Sep 14 '07 #3
MMcCarthy
14,534 Recognized Expert Moderator MVP
No you can use this code on a query. Just substitute the query name for the table name.
Sep 14 '07 #4
MGrowneyARSI
90 New Member
as long a the value in the table will not change while you are in the form your working with I would sagest that you set a variable = to a Dlookup like Mary suggested do this in the on open event of the form and then just set the text box equal to the variable. The only resign for this step is so that you only run the Dlookup once; this will keep it from slowing down you app other than that you’re on the right track
Sep 14 '07 #5
Gilberto
135 New Member
Perfect. Thank you all for your help
Sep 14 '07 #6
MMcCarthy
14,534 Recognized Expert Moderator MVP
Perfect. Thank you all for your help
You're welcome.
Sep 14 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

11
4663
by: bala | last post by:
hi!!! i need to display a disclaimer which is two page in length in a word document. i also need to format the text. the idea is something as follows on opening the application, a form which serves as splash screen with the disclaimer of the application is shown. now the problem i am running into is in the display of the disclaimer which is really two page long and it should be formatted too. using a textbox seems not
1
3319
by: David | last post by:
Hi, I have a continuous form. For each record I have a field 'HeldDate' (Text Field from a table) Against each record I have a button which sets the visibility of this text box to 'True' and does various other actions. Is it possible to display the text box just for the current record, rather than it displaying for all following records at the same time, i.e. set visibility to true where record id - xxx
9
5821
by: Greg | last post by:
Hi, I have a table with "dates", i'd like to display those dates on a calendar. I've put a calendar in a form, linked to my "date" field, and it works, but only showing one "date" per calendar. I can see all "dates" moving to next records, but one per calendar. :-( Ex: 17/06 on one claendar, then if i click on next record, I can see my calendar with 24/06 ...etc ...
4
2216
by: sparks | last post by:
I am trying to fix a database that someone did about 4 yrs ago in access97. The main table just contains demographics and is on the main form of the database. It has a subform on a tab that contains the other information. it is set 1 to 1 in the relationships. simplify if I can
1
2259
by: Jimmy Stewart | last post by:
Is there a way to set up a combo box so that when the user clicks the arrow, the list is populated with info from a specific field from a table but once they select an option, data from another field gets displayed in the box? In other words, when the user selects the drop down list, I want a them to see a list of full titles for them to select. Once they click on a title, however, I want an abbreviation to get put into or displayed in the...
7
4539
by: john | last post by:
In my form I have a master table and a details table linked 1xM. I can search through the whole parent table but I also like to be able to search through the child table fields to find parent records. Should I design a new form for this or can I somehow make this work in the same form. Thanks in advance, john
9
2636
by: wparrott | last post by:
I have a table called tblPayScales. It has 5 fields: numRecID - record ID txtCLASSCODE - a 1 or 2 letter text value (A, B, C, BD, L, LT, etc.) numPAYSTEP - a number value 0-49 numSALARY - a number value such as 36,246.00 numNEWSALARY - a number value derived from a user-defined percentage The table contains records for each CLASSCODE/PAYSTEP. Although there are 50 pay steps some have a value of 0 for numSALARY(no employee at that pay...
1
3773
by: Coll | last post by:
Hi - I'm trying to figure out how to append a record to a table and then open a form and display that record. My thought was to use the autonum primary key field (recordnum) and display the highest value (which would be the new record), but I'm not sure if that can be done. Any thought on displaying the record with the highest value in the recordnum field or another approach would be appreciated. Thanks!
2
3895
by: banderson | last post by:
Hello, I have a data entry form for a table with information about buildings and am having a problem making a combo box do what I want. I would like to make the combo box show a list of unique bldg mgmt company names and then to open a building management company form to show all records with this name, so the user can find the correct branch location to select. Then, upon closing the building management company form, the active/selected record...
6
5120
by: Gord | last post by:
I have a report whose Record Source I set in code when clicking on a command button on a form. This Record Source is a table that gets created by the code. I have a textbox on the report whose Control Source is a field in this table. The field type is currency. Everything works good so far. When the value in the field is zero dollars $0.00, I want to conditionally display "N/A" (not applicable) instead of $0.00 on the report...
0
9618
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10259
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10101
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.