OpenArgs帮助 [英] OpenArgs help
问题描述
您好,
我需要帮助设置OpenArgs函数,我需要在表单中复制一个ID,而我之前从未使用过它。
I need help setting up the OpenArgs function, I need to copy an ID across forms and I have never used it before.
这是我在我试图复制的表格上的内容:
This is what I have on the form I am trying to copy from:
Private Sub Command13_Click()
  DoCmd.OpenForm"Form2",acNormal ,,, acFormAdd,Me.CustomerID
End Sub
Private Sub Command13_Click()
DoCmd.OpenForm "Form2", acNormal, , , acFormAdd, , Me.CustomerID
End Sub
这是什么我在我试图复制到的表格上:
This is what I have on the form I am trying to copy to:
CustomerID字段包含字符和数字,但是我只能复制数字部分。
The CustomerID field contains both characters and numbers, however so far I can only copy over the numbers part.
另外,我一直收到一条错误,上面写着"CustomerID_Reservations"。 (在上面的代码中也是Text1语句)在Customers表中找不到,但是"CustomerID_Reservations"和"CustomerID_Reservations"中没有找到。字段位于单独的
表中,即预订表。
Also, I keep getting an error which says that the "CustomerID_Reservations" (which is also the Text1 statement in the above code) could not be found in the Customers table, however the "CustomerID_Reservations" field is on a separate table, which is the Reservations table.
我真的可以使用一些帮助。
I could really use some help with this.
谢谢。
推荐答案
您声明CustomerID具有数字和文本。您将维度设置为整数,以便解释为什么它接受您的CustomerID。将其设置为字符串值。
You state that the CustomerID has number and text. You set the dimension to Integer so that explains why it is nit accepting your CustomerID. Set it to a string value.
第二部分是指字段。是me.text1绑定到customerID_Reservations字段?换句话说,预订表格的来源是什么?
The second part refers to a field. is me.text1 bound to the customerID_Reservations field? In other words is the source of the form the Reservations table?
这篇关于OpenArgs帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!