473,378 Members | 1,623 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Bind the whole method with a text box

I wrote a query in Form_Open method but i didnt bind it with the
textbox. How to i bind this whole method with the text box, as right
now the textbox shows the last value of the recordset. The textbox is a
part of a subform and it shows three times the last value of the record
set.

Private Sub Form_Open(Cancel As Integer)
Dim qry As String, rst As Object
qry = "SELECT tbl_EquipmentChronology.Equipment1 FROM
tbl_EquipmentChronology INNER JOIN tbl_events ON
tbl_events.TicketNum=tbl_EquipmentChronology.Ticke tNum where
tbl_events.TicketNum=" &
Forms!tbl_PPVResearch_Edit!frm_Events!TicketNum & " and
tbl_events.PPVVOD_Outlet=tbl_EquipmentChronology.O utlet"
Set rst = CurrentDb.OpenRecordset(qry)
rst.MoveFirst
Do While Not rst.EOF
Forms!tbl_PPVResearch_Edit!frm_Events!Text2 = rst!Equipment1
rst.MoveNext
Loop
End Sub

Aug 15 '06 #1
1 1443
You don't do it this way. Use DSUM and an unbound control.

Aug 16 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dowding George A | last post by:
Brent B. Welch gives this example in _Practical Programming in Tcl and Tk_. bindtags $t bind ViInsert <Escape> {bindtags %W {ViCmd %W all}} bind ViCmd <Key-i> {bindtags %W {ViInsert Text %W...
6
by: Clarence Gardner | last post by:
I've got a problem that I don't see how to program around. A socket server that was running fine, today started getting an exception from the bind() call (errno 22, Invalid argument) and yet the...
2
by: Binny V A | last post by:
Hello Everyone, I am new to python and I am trying to get a program to close a application when the Escape Key is pressed. This is the code that I used ---------------------------------...
4
by: 0k | last post by:
Hi everyone, I am trying to write a small app that sends multicast udp packets using a socket object. I have more than one NIC on my PC and the following code works OK only if I disable all the...
7
by: Jed | last post by:
I have a web service method that returns an array of custom objects marked serializeable with fully described public properties. When I bind the results to a DataGrid I can access the properties...
3
by: MrMike | last post by:
Hi. I have a dataset on my webform which I successfully fill by calling a Sub that occurs after the Page_Load. My question is - I have a textbox control which I need to populate with the contents...
0
by: teclioness | last post by:
Hi, I am using gridview for the user to update rows. In a row, there sre two columns, which need to be updated. When the gridview is to be shown, the row should show the values from database....
3
by: DavidPL | last post by:
Hello, I have some problem with bind method in PDO on Oracle with clob | long column type. I have table named TEST_TABLE where I have two columns: ID (int 10, 0) and TEXT (varchar 4000 or long...
2
by: darren.murray2 | last post by:
Hello all, I'm fairly new at this so I may be doing this the wrong way but I've got a FormView within a multiview that when it is updated in edit mode, will call on the update method associated...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.