字符串从查询中获取行以填充单元格 [英] String take rows from query to populate a cell

查看:75
本文介绍了字符串从查询中获取行以填充单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个包含房间号列表的表,如果第二个单元格为真,则在另一个表或文本框中填充一个是/否的列。


例子


RoomNum |清洁

110-1 | 1

111-1 | 0

112-1 | 1

113-2 | 1

114-1 | 0

114-2 | 1


下一页


洁净室110-1,112-1,113-2,114-2

I am attempting to make a table which contains a list of room numbers and a yes/no column populate a cell in another table or textbox IF the second cell is true.

example

RoomNum | Clean
110-1 | 1
111-1 | 0
112-1 | 1
113-2 | 1
114-1 | 0
114-2 | 1

Next table

Clean Rooms 110-1,112-1,113-2,114-2

推荐答案

crmrpage,


欢迎来到Bytes!


首先,这个论坛的任何专家都会告诉你相同的信息关于你的要求的事情。我们都建议不要根据你的第一张桌子的结果创建或更新第二张桌子。


你要找的是一个干净的房间清单,是吗?然后,要获取该信息,您只需创建一个查看第一个表的查询,并仅返回那些将Clean字段设置为True的记录。


它会看起来类似于:

crmrpage,

Welcome to Bytes!

First, just about any expert on this forum will tell you about the same thing concerning your request. We would all advise against creating or updating a second table based upon the results of your first table.

What you are looking for is a list of clean rooms, yes? Then, to get that information, you simply create a query that looks at your first table, and returns only those records which have the Clean field set to "True".

It would look something similar to this:

展开 | 选择 | Wrap | 行号


这是问题的一部分,它必须填充单个文本框或者以某种方式用字符串写成可打印的报告。查询部分我没问题,它将它作为一个字符串在单个文本框中显示

110-1,112-1,113-2,114-2。

我试图不让用户以可用于可打印报告的其他方式输入数据。

类似于它在报告的notes2部分中的显示方式。不幸的是,我有它,他们必须单独输入每一个


我只需要这样就可以在报告中显示

That is part of the issue, it must populate a single textbox or somehow be written in a string for a printable report. The query part I''m okay with, it is putting it as a string to show
110-1,112-1,113-2,114-2 in a single text box.
I am attempting to not make the user input the data in an additional way for the printable report.
Similar to how it appears in the notes2 section of the report. Unfortunately that one I have it where they have to enter each one individualy

I only need it that way for the purpose of displaying in a report

附加图像
< img class =inlineimgsrc =/ images / attach / jpg.gifalt =文件类型:jpgwidth =16height =16border =0style =vertical-align:baseline /> (91.9 KB,58 views)
Attached Images
(91.9 KB, 58 views)


您可以通过一个功能轻松完成。你使用VBA多么舒服?创建一个简单的函数....
You can do that easily through a function. How comfortable are you working with VBA? It is really an easy function to create....


这篇关于字符串从查询中获取行以填充单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆