HOW TO GET DATA FORM FORMS FIELDS

Hi!

How can i get a hold of all the fields in Access form...basicly all the 
controls. I'm developing in Visaul Basic .Net framework 2.0. 
So far i only know how to find the right form 
(appAccess.CurrentProject.AllForms(x)) but i cant get information from its 
fields.
-- 
.... but the beer is still good!
0
Utf
10/1/2007 4:09:04 PM
access.forms 6864 articles. 2 followers. Follow

2 Replies
931 Views

Similar Articles

[PageSpeed] 52

On Mon, 1 Oct 2007 09:09:04 -0700, Antinsh <Antinsh@discussions.microsoft.com>
wrote:

>Hi!
>
>How can i get a hold of all the fields in Access form...basicly all the 
>controls. I'm developing in Visaul Basic .Net framework 2.0. 
>So far i only know how to find the right form 
>(appAccess.CurrentProject.AllForms(x)) but i cant get information from its 
>fields.

You're aware, I hope, that the form is just a window; if you want Access data,
the best place to go is the Tables where the data resides!

That said... a Form object has a Controls collection. A Form has no fields
(tables and queries do), only controls; some of the controls would be bound to
table fields, and some (such as labels) will be unbound. You can loop through
the Controls collection looking a the Value property of each control, and
trapping and ignoring the error for those controls which have no Value.

             John W. Vinson [MVP]
0
John
10/1/2007 4:54:36 PM
answered in m.p.access

Pieter

"Antinsh" <Antinsh@discussions.microsoft.com> wrote in message 
news:641DC12B-7F65-44B4-9FE3-88C62A166DB6@microsoft.com...
> ...Yes I'm aware of what you said in 1st paragrah, thanx for you concerns
> though :)
>
> My problem was that i didnt know how exactly (from code) can controls of a
> form can be reached not that i didn't understand the whole concept. The 
> thing
> is needed to reach those controls from vb code and you cant do that the 
> same
> way you reach classic controls in forms.  Anyway i found a way to do this
> (that is someone told me in general questions :) ).
>
> -- 
> ... but the beer is still good!
>
>
> "John W. Vinson" wrote:
>>
>> You're aware, I hope, that the form is just a window; if you want Access 
>> data,
>> the best place to go is the Tables where the data resides!
>>
>> That said... a Form object has a Controls collection. A Form has no 
>> fields
>> (tables and queries do), only controls; some of the controls would be 
>> bound to
>> table fields, and some (such as labels) will be unbound. You can loop 
>> through
>> the Controls collection looking a the Value property of each control, and
>> trapping and ignoring the error for those controls which have no Value.
>>
>>              John W. Vinson [MVP]
>> 


0
Pieter
10/1/2007 9:10:55 PM
Reply:

Similar Artilces:

Form & Query help
Hi, I have a form designed to compile an email based on database records and enables the user to open MS Outlook and have the email already populated. The form's Record Source is a query - qryCurrentRecord. That query is based on two tables where the field StaffName from 'tblQueryDetails' is linked to the field StafffName from 'tblEmailAddresses', enabling the email address for that staff member (tblEmailAddresses.StaffEmailAddress) to be returned by the query. So on my form I have a text box representing the 'To' address for the email, the Control Source ...

restoring pst but it has missing data?
I changed my motherboard so had to reload Outlook 2007. On selecting original pst file I do have the last incoming emails but sent emails are missing as are all of my contacts. What did I do wrong? regards, Hard to know what you did wrong because we don't know what you did. Apparently you either selected the wrong data file or connected to it incorrectly. -- Russ Valentine [MVP-Outlook] "nobody" <nobody@nowhere.com> wrote in message news:uOB4PPkfJHA.4868@TK2MSFTNGP05.phx.gbl... >I changed my motherboard so had to reload Outlook 2007. On selecting >ori...

getting the subject line out of a mail
Hi I am using following code to get time stamp and subject from a mail item Sub TimeStampDigger() Dim i%, myItem As Outlook.MailItem, excelApp As Object, excelBook As Object Set myItem = Application.Session.GetDefaultFolder(olFolderInbox).Items(1) myTime = myItem.ReceivedTime Set excelApp = CreateObject("Excel.Application") Set excelBook = excelApp.Workbooks excelBook.Open ("C:\Documents and Settings\n.bansal\Desktop\Report Delivery Performance") End Sub I am having problems in getting the subject. Kindly help. Nites...

Master detail form with graphs
Hi, I havent used any graphics before. What I want to to is produce a master/detail form displaying information in graphical aswell as textual information. Say, for example, the master is a stock market with the master graph showing the index through the day with associated test say (max min) and the detail rows are individual stocks showing each price movement thoughout the day with relevant text. It would be nice if the "stocks" were multirow so I can view more than one simultaneously. Any idea how I can accomplish this easily - I have all the database processing done and I ha...

find multiple data cells for one data source
I need a formula that will help me organize country codes. In Column A, I have 3 digit codes that have a country code, in column B, associated with it. The 3 digit codes appear multiple times in the spreadsheet. I need a way to show the 3 digit code and any and all of the country codes that are associated with it on one row. Example of my raw data below: ABF CN ABF MX ABF US ACC CN ACC IE ACC MX ACC TW ACC US Desired Output: Col A Col B Col C Col D Col E Col F ABF CN MX US ACC CN IE MX TW US Satisfactory out...

hidden a field in Exchange
I have hidden a field in Exchange so when people click on a mailbox properties they don't see it but someone has found a way to display it, simply using the Add to Contact button from the mailbox properties in Outlook. How can I modify this behavior so the hidden field is NOT transported in the contact folder ? The field we're using is the Notes in the telephone tab. Thanks. ...

Get Runtime Error or Server Error in '/' Application
All of a sudden, we receive a Runtime Error or Server Error in '/'Application when trying to save changes to any data in CRM. Cannot log cases, new data, or changes to any existing Accounts, Cases, etc. Any ideas? I have tried rebooting server, stopping and restarting all CRM services, and have refreshed the link to the Server in the Deployment Manager. Hi Michele, have you turned on dev errors and checked the application event log? Mike ------------ Greaterthantwo Media http://www.greaterthantwo.com Coming Soon: Send bulk email templates with file attachments from Outlo...

Get a Sony Laptop
Get a Sony Laptop with Genuine windows7 Premium For more details http://jobinfoworld.webnode.com ...

Data from .txt file being read in as date, and should be text #2
I have a macro that reads in data from a .txt file. The data contains user IDs that consist of the first 4 letters of their name and 4 numbers. When names are read in that begin with MARCxxxx (ie MARC1234), excel is formating them as a date, and I lose the original data (even when I try to format them after the import, they are a number and the letters are not there. I've tried to format the column that they data read into before the import, but excel still imports them as a date. How can I make the import be read as text? Here is the code for the section I am reading in data for. Do Whi...

Problem importing data form textfile
Hi, We are migrating our database from Access 97 to Access 2003. In our 97 version this line worked fine: DoCmd.TransferText acImportFixed, "HDMARTPC", "tbl3031_HDMARTPCDAT", "C:\HdbDatabase2003\hdmartpc.dat" But in the 2003 version I am getting error 31519 (translated): You can't import this file. It seems that in Access 2003 it is no longer possible to read from a textfile with a suffix .dat, because when I rename my sourcefile to hdmartpc.txt, I can import this file with no problem. I only want to use the option to rename this file as a last resort, bec...

Changing data in the main program from a dll
I'm trying to write a dll that changes data in the main program. I pass pointers to the data or pass pointers to functions in the main program that change the data. Everything works fine in debug mode, but fails in the destructor in release mode. Any ideas about why? Thanks, Ken Nothing obvious stands out. What type of dll is it, Regular or Extension? If its a regular dll, are you playing with resources in your dll method that is calling the main program? -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "Ken->" <handsom@comcast.netspicedham> wrote in message news:i...

data left and right of x axis
tryingt o make a bar chart with values 8,8,3,9,3 i need values under 5 to be left of vertical axis only and values over 5 to be right... so eight would be 3 places right three would be two places left hope that makes sense.. i have NO idea how to do this HELP!!!!! Right click on the other axis, choose Format... On the tab that allows you to enter scale parameters, find 'Axis Crosses At' or perhaps 'Category Axis Crosses At' (depending on version) and enter 5 in the box. This will position the crossing axis at 5. The bars will start at this vertical line and move left or...

How to get current File Pointers Physical Position on Drive/CD/DVD...
Hi, i am looking for a way to get the current file pointers position on the Media i want to read/write. The Application will be written in .NET (2.0). Are there any Win32 Functions to retreive the position on the Media, e.g. Drive Sector/ Cluster, etc... TIA Best regards Kerem G�mr�kc� is this helpful .........???? http://ext2read.sourceforge.net/documentation/inside-hard-disk/ "Kerem G�mr�kc�" <kareem114@hotmail.com> wrote in message news:uuFm%23Dd8GHA.3644@TK2MSFTNGP03.phx.gbl... > Hi, > > i am looking for a way to get the current file pointers position o...

Forms Field List
I am using a form that someone else had created but I wanted to add a check box to it. I added a field in the souce table but when I go to the form in design view the new field is not listed. What am I doing wrong? Hendrix, I would imagine that you have a query as the Record Source for your for. So... that field has to be included in that query. In query design mode, just drag that field to the grid. It should then show up on the Field List in Form Design. -- hth Al Campagna Microsoft Access MVP 2007-2009 http://home.comcast.net/~cccsolutions/index.h...

Get help in Office newsgroup....again
(Note the Office newsgroup messages from the Mactopia forum interface have not been showing up for users that use a newsreader. This problem happened around Sept 24. Your questions are not being ignored. We just can't see them.) Ask your questions using Entourage's newsreader. <http://www.entourage.mvps.org/support_options/subnews.html>) -- Diane Ross, Microsoft Mac MVP Entourage Help Page <http://www.entourage.mvps.org/> Entourage Help Blog <http://blog.entourage.mvps.org/> Hi Diane - I appreciate what you're hoping to do & applaud the effort but ...

excel user data
Is there a file that holds user data such as page break locations that could be transferred to a new machine? AFAIK that would be part of each workbook. -- Don Guillett SalesAid Software donaldb@281.com "Jnewsome" <jmnewsome@gdph.state.ga.us> wrote in message news:d02d01c48aac$1051a290$a401280a@phx.gbl... > Is there a file that holds user data such as page break > locations that could be transferred to a new machine? NOTE: page break settings are workbook-specific and would be stored with the workbook. For other global stored settings.......... Do a file search...

Clear data button for workbooks
Does anyone know how to create a button or tab that you can click on, in the workbook, that will delete data in the worksheets. I've made an overtime tracking spreadsheet that calculates hours over a 14 week period. (14 worksheets) However, after the quarter or 14 week period is over I currently have to go back and delete all the data hours in the workbook in order to start a new 14 week period. I'd like to create one button(cell) that I can click on that will clear all data for me. Any ideas or advice? thanks, tim ------------------------------------------------ ~~ Message pos...

Using Linked forms/subforms to update data on SQL Server
Hello, I designed a database in Access and then transferred the data to SQL Server. The linked form/subform that worked when the data resided within the Access database is not functioning properly. Here's the setup: tblContacts has Primary Key ContactID (formerly Autonumber, now an identity field in SQL Server) tblAddress contains Contact ID and also Primary Key CARID (also now an identity field in SQL Server). Using SQL Server Enterprise Manager Diagram, I set up a one to many relationship between tblContact and tblAddress with cascade updates/deletes (one person can have multipl...

select a record using datasheet view, then use form view to edit
Here's what I'm trying to do: I've created a form using autoform which creates a form with the parent table info on top and the child table below in datasheet view which is what I want because I want the user to be able to see all the related records easily. How can I open the child record in form view from the datasheet view? thanks for your input ...

Comparing data in tables
I have two Tables, A and B. Both have the same structures, keys etc. Both are downloads from another Table at different times. I would like to be able to compare the data in these two tables to highlight the different records. Can anyone advise how to do this, please. Gerry I would use conditional formatting with a formula like =COUNTIF($H$1:$H$1000,A1)>0 for the first and =COUNTIF($A$1:$A$1000,H1)>0 in the other and set a cell colour (pattern) -- HTH RP (remove nothere from the email address if mailing direct) "Gerrym" <anonymous@discussions.microsoft....

can i restrict data entry from certain columns
Is there a way to keep data from being entered in all columns afte column B? The data is scanned by wireless barcode scanner and th scanner can only have one suffix (i.e. tab, space, enter) {can' alternate}. This will help in having to go back and cut and paste al the entered data to the correct position on the spreadsheet -- surgeando ----------------------------------------------------------------------- surgeandoj's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2503 View this thread: http://www.excelforum.com/showthread.php?threadid=38561 Select the c...

Freight field on a PO, Landed Costs
We have used a non-inventory item named 'FREIGHT' to charge for the related freight costs when creating PO's for the past several years. I was curious about using the Freight field instead. Can someone explain why this is used or rather why it should be used due to our non use of it? Also, in a test company, I just entered a PO and with a amount in the freight field and when I received the PO the freight amount did not come over. It was greyed out. Then when I match the invoice the freight amount was $0.00. I assume there is a setup problem however, I cannot resolve it. ...

what is the most efficient way to move data across network? And st
Hi, I would to send data as the most efficient way, as compact and as fast as possible. So I think any serialization is out of picture. A fundamental way is to translate all my fields in the class as bytes and pass it, then reconstruct it on other side. This may also save me a lot of hassle if passing between windows and linux, c# and c++. So i try to use Buffer.BlockCopy to create byte array, pass it to socket. use BitConverter to read them back. I like to use fixed size array for efficient parsing at the client side. The only problem I run into is string assuming I have one ...

Microsoft.Dexterity.Applications.Dynamics.Forms.CustomerLookup
Hi, I am trying to create a GP 9 Addin using Visual Studio tools. I basically need to create a new form which needs the user to select a Customer. I am calling the Microsoft.Dexterity.Applications.Dynamics.Forms.CustomerLookup form and adding an event handler to get the name of the selected customer back. The problem is that I am not able to remove the event handler which keeps getting fired everytime the Customer lookup form is loaded from anywhere else in GP. Here's the code that I am using, Can someone please suggest whats the correct way of doing the lookups? { Microsoft.Dexte...

sum data betwen two blank row
I have a file like below sub-total jan 10 20 30 <== how to creat a formula to sum data between blank row ? feb 30 10 10 50 Assuming your data starts on row 2, allowing for headers, put this in C2: =3DIF(AND(B3=3D"",B2<>""),SUM(B$2:B2)-SUM(C$1:C1),"") and copy down as far as needed. Hope this helps. Pete On Nov 27, 7:10=A0am, eva cheng <eva ch...@discussions.microsoft.com> wrote:...