473,903 Members | 4,483 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to attach an SQL statement to an unbound control????

Hello:

How do you attac an SQL statement to an unbound forms (or reports)
control in A2002?

I created an unbound text box, and I want to attach the following SQL
statement.....
select count(node) from b321bl where stdverifyby = 'test'
I have several of these to add to this form, so I would really
appreciate your help. Yes, I tried ....
=select count(node) from b321bl where stdverifyby = 'test'
in the "Record Source" property and it would not compile.

Thanks for any ideas.

Richard Hollingsworth

Nov 12 '05 #1
2 2242
Try using the DCount function

=DCount("Node", "b321b1", "stdverifyby='t est'")

You can replace the field name, Node, with * depending on the count you
need.

--
Wayne Morgan
MS Access MVP
"Richard Holliingsworth" <wi************ *******@boeing. com> wrote in message
news:Ht******** @news.boeing.co m...
Hello:

How do you attac an SQL statement to an unbound forms (or reports)
control in A2002?

I created an unbound text box, and I want to attach the following SQL
statement.....
select count(node) from b321bl where stdverifyby = 'test'
I have several of these to add to this form, so I would really
appreciate your help. Yes, I tried ....
=select count(node) from b321bl where stdverifyby = 'test'
in the "Record Source" property and it would not compile.

Thanks for any ideas.

Richard Hollingsworth

Nov 12 '05 #2
Apply the SQL to the controls ControlSource property. For combos and
listboxes use the RowSource property.

Mike Storr
www.veraccess.com

"Richard Holliingsworth" <wi************ *******@boeing. com> wrote in message
news:Ht******** @news.boeing.co m...
Hello:

How do you attac an SQL statement to an unbound forms (or reports)
control in A2002?

I created an unbound text box, and I want to attach the following SQL
statement.....
select count(node) from b321bl where stdverifyby = 'test'
I have several of these to add to this form, so I would really
appreciate your help. Yes, I tried ....
=select count(node) from b321bl where stdverifyby = 'test'
in the "Record Source" property and it would not compile.

Thanks for any ideas.

Richard Hollingsworth

Nov 12 '05 #3

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

Similar topics

3
3787
by: Dos Lil | last post by:
I have a unbound field in the subform(for calculating the datediff) which has the control property ==DateDiff("n",,). I have another unbound field in the main form which is for displaying the datediff from the subform.I have set the controls source = .Form! FRM- TimeSheet Subform is the name of the subform and TXTTtalHoursworked is the name of the unbound field in the subform.
3
6345
by: Pat | last post by:
Hello, I've used Sum() to total bound fields on a continuous form with no problem. However, I now have a continuous form, on which I use an unbound field to calculate the number of hours between two times stored in a record (bound fields). This field is called txtDuration. On my footer, I've created another unbound field named txtWeeklyTotal. I've set the Control Source to =Sum(), but this returns a #Name? error. I've tried . and it...
3
2364
by: Trevor Hughes | last post by:
I am trying to resolve a problem I'm experiencing in Access 2000. I have an unbound control which is set be code on the open event of a form. However when I try to subsequently run some code which references the value in the unbound control, the code cannot see the value set. If however I manually type in the value into the unbound control the code works fine. I have tried to Refresh and Repaint the form, but this does not solve the...
2
8270
by: hmiller | last post by:
Hope I make my case clear!!! I have a table with two bound date/time fields. I want to be able to use an IF statement and DateDiff to return a text message in an unbound text box. I want to do this all from the control source of the unbound text box. What I think it should look like is something like this; If(DateDiff("d",,)) > 5, Then Display "On Time"
3
1872
by: hmiller | last post by:
I have created and IIF statement in an unbound text box. The IIF statement produces a text result, ie "On Time", in the unbound text box. What I would like to do is reffence this text box and then the result contained in the text box. Something like this: =Dcount("*","The form where the unbound text box is","TextBox='On Time'") How can I get this work work? Is it possible to reference an unbound text box? (I have read this box
3
3419
by: TD | last post by:
I have an unbound form that adds and updates records to one table. I use an INSERT sql statment to add a new record and a UPDATE statement to update a record. I created a function named C2F to check each field for null. If the field is null I need to write the value null to the table. This is a sniplet of the UPDATE sql statement: sql = sql & "SSP4_Cut = '" & C2F(SSP4_Cut) & "', " that is:
18
3814
by: TORQUE | last post by:
Hi, Im wondering if anyone can help me with a problem. I have a form with more than 50 unbound fields. Some of the fields will be blank from time to time. This seems to be where im having trouble. I have tried keeping some of the fields bound and when I use the save button it has been saving as 2 different records. This is unacceptable. This is what I have, can anyone help me out with this?
3
2019
by: scott_baird | last post by:
Probably something simple, but it's driving me up the wall... In a report, I have an unbound control that is the total of 2 other bound controls (currency) as follows: unbound control =cash1 + cash2 However, it is possible that either cash1 or cash2 can be null, in which case the unbound control displays nothing (apparently, addition only works with a zero or above). What I want to do is something along
5
2663
by: SBC News Groups | last post by:
Using VBA how do I assign columns from a table to controls on an unbound form? Mike
0
9849
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11285
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...
1
10986
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
10501
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8049
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5894
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
6094
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4308
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3324
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.