将记录集设置为Sub Sub Form [英] Setting recordset to Sub Sub Form

查看:63
本文介绍了将记录集设置为Sub Sub Form的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

twinnyfo ...如果你愿意参加这个,我会很喜欢的。


你会记得我之前的问题,我有两个问题......一个是将记录集设置为第二个子表单到父表单,另一个是将第一个子表单设置为从第二个子表单过滤掉。我们解决了第二个问题,但事实证明,我仍然无法为第二个子表单设置记录集。


这就是我用过的......

twinnyfo... I would LOVE it if you would jump in on this one.

As you will recall to my prior question, I had two issues... One was setting the recordset to a 2nd subform to a parent form, and the other was getting the 1st subform to filter off of the 2nd subform. We solved the 2nd question, but as it turns out, I am still unable to set the recordset for that 2nd subform.

This is what I used...

展开 | 选择 | Wrap | 行号

推荐答案

这是一个更新。我提出了一个不同的解决方案,那就是使用表作为记录集而不是记录集克隆。这很有用,但是......


我试图做的是循环记录集,每当它找到包含搜索词的记录时,我就会抓住它ActionID并将其放入字符串ActionID = &安培; rs.Fields(ActionID)& "或者


所以,当它完成循环时,我会在我的strFilter中得到这个...

ActionID = 5321或ActionID = 5916或ActionID = 6133或ActionID = 6629 ...

一旦完成,我将剥离最终的或者


一切都很好,但显然Access不喜欢真正的长过滤字符串。当我试图应用过滤器时,我一直都会遇到错误(关于属性太长了)。


当然我输入了这个,我意识到我们现在完全不同了题。叹。如果您需要进行管理工作,并将其移至另一个问题,请成为我的客人。


谢谢。
Here is an update. I came up with a different solution, and that was to use the table as the recordset instead of the recordsetclone. That worked, but...

What I tried to do was to loop through the recordset, and every time it found a record with the search word in it, then I would grab that ActionID and put it into a string "ActionID = " & rs.Fields("ActionID") & " OR "

So, when it finished looping through, I would end up with this in my strFilter...
ActionID = 5321 OR ActionID = 5916 OR ActionID = 6133 OR ActionID = 6629...

Once it was all finished, I would strip off the final " OR "

All well and good, but apparently Access does not like REALLY long filter strings. I kept getting errors when I attempted to apply the filter (something about the property being too long).

Of course I finish typing this, I realize that we are now onto a COMPLETELY different question. Sigh. If you need to do your admin work, and move it to a different question, be my guest.

Thanks.


不用担心现在缓和。


有什么可以帮助知道SQL中过滤器(或WHERE子句)中的替代格式是:
No worries about the moderating for now.

What may help is to know that an alternative format in a filter (or WHERE clause) in SQL is :
展开 | 选择 | Wrap | 行号


哇...首先是twinnyfo,现在是NeoPa。真是太棒了!


我喜欢备用SQL设置。我从来没用过那个。这应该给予更多的空间。我会试一试。


谢谢。
Wow... First twinnyfo, and now NeoPa. What a deal!!!

I like the alternate SQL setup. I’ve never used that. That should give quite a bit more space. I’ll give it a shot.

Thanks.


这篇关于将记录集设置为Sub Sub Form的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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