Question Need help on Creating "HELP" table relate to every single form

babui386

Registered User.
Local time
Today, 01:32
Joined
Feb 25, 2013
Messages
22
Hi,

I am trying to learn how to dynamically pull the answers based on which form you are.

Example, I have 5 sample form (Customer, Supplier, Products, Purchase Order, Sales Order etc)...

When I am in Customer Form, I have a lblHelp button which will trigger to a new page and will pull the data from the tblHelp only related to Customer Form "Question and Answers" and so on for other forms.

Table culum for tblhelp - HelpID (Auto), FormID (Number), HelpCategory (Text), HelpFormPageName (Text)

I also added a culum in Customer table as FormID (Number),
(Customer FormID - 1), (Supplier FormID - 2), in table help FormID for all Customer related questions and answers will be 1.

Hope I have explained, if its confusing please ask, I am just trying to learn how to pull record based on form selection.

Regards

Babui386
 
Build your help form off of your tblHelp, then for your help button on each form you put a DoCmd.Open form for the OnClick event, using the HelpID as the criteria:

Code:
helpitem= 1
DoCmd.OpenForm "Employees", , ,"HelpID=" & helpitem

Be sure to change the value of the helpitem to the correct HelpID for each form.

Side question: whats the difference between HelpID and FormID?
 
Build your help form off of your tblHelp, then for your help button on each form you put a DoCmd.Open form for the OnClick event, using the HelpID as the criteria:

Code:
helpitem= 1
DoCmd.OpenForm "Employees", , ,"HelpID=" & helpitem

Be sure to change the value of the helpitem to the correct HelpID for each form.

Side question: whats the difference between HelpID and FormID?


Hi thanks for the response...

In this way I need to create multiple forms for each page. Just to avoid that I was thinking each form will have their own UNIQUE number e.g.

For Customer FORM - FormID - 1
For Supplier FORM - FormID - 2
For Purchase Order FORM - FormID - 3
For Invoice FORM - FormID - 4
For Product FORM - FormID - 5

So, I was thinking if there is a FILTERING from Customer Form when lblHelp clicked, it will PULL the data from the tblHelp only those matches the FormID - 1

FYI : I have a culum in tblCustomer - FormID (value=1) and same in tblHelp, but I am not sure how to relate to each other.

I was just thinking not to repeat multiple form creation.
 
Hi,

Just tried to place the code -

Private Sub lblhelp_Click()
helpitem = 1
DoCmd.OpenForm "rptHelp", , , "HelpID=" & helpitem = 1
End Sub

But getting error in line "DoCmd.OpenForm "rptHelp", , , "HelpID=" & HelpItem = 1"
 
My suggestion required you build one form and then filter it using the Help button on each form that had a help button.

As for my code, you only need to change the value in the first line of it (helpitem=1).

Code:
Private Sub lblhelp_Click()
 
helpitem = 1
    ' change the 1 above to the correct HelpID value
 
DoCmd.OpenForm "rptHelp", , , "HelpID=" & helpitem
End Sub

Also, why do you have HelpID and FormID fields in tblHelp? Explain to me what you believe the purpose of each is.
 
My suggestion required you build one form and then filter it using the Help button on each form that had a help button.

As for my code, you only need to change the value in the first line of it (helpitem=1).

Code:
Private Sub lblhelp_Click()
 
helpitem = 1
    ' change the 1 above to the correct HelpID value
 
DoCmd.OpenForm "rptHelp", , , "HelpID=" & helpitem
End Sub

Also, why do you have HelpID and FormID fields in tblHelp? Explain to me what you believe the purpose of each is.




Hi,

Thanks for your response, its working but not as expected...

OK the reason I was thinking is -

The purpose of the table is to keep store question and answer related to that form.

So, one form has multiple question and answers. Its almost like a FAQ / Help section for that individual page. (How to use)

Now - Primary key is "HelpID" which is a AUTONUMBER. It can't be duplicate.
FormID - can be duplicate, with the FormID - I can store value for my each FORM - e.g. CustomerForm=1, SupplierForm=2.

Now onClick to lblHelp button in my current form of frmCustomer, the result should come to frmHelp form - ALL RECORDS that value of FormID = 1, that way I PULL all the question and answers of the frmCustomer form page.

There might be different way to do it, I am not sure, I am completely new to Access programing and just trying to learn step by step.

If you have any alternative way, please explain.

FYI - with the above code, I have successfully pulled ONE record but not all records which has value = 1

Looking forward ....
 
That FormID, HelpID explantion helps. My initial code was linking to just one question (HelpID), whereas it needed to link to a Form. Use this code to pull up all questions related to a form, not just one:

Code:
Private Sub lblhelp_Click()
 
formnum = 1
    ' change the 1 above to the correct FormID value
 
DoCmd.OpenForm "rptHelp", , , "FormID=" & formnum
End Sub
 
Hi Plog,

Tried with the above code, I have also changed my form to a report view, where currently I am pulling full q&a.

From my frmCustomerMaster form with the lblHelp button I have added above codes, but getting error..

The form name 'rptHelp' is misspelled or refers to a form that does not exist.

Where as I have the rptHelp (Report) is ready and working.

Please help.
 
I'm going to help you help yourself:

The form name 'rptHelp' is misspelled or refers to a form that does not exist.

Access gives a lot of cryptic errors, but come on, that's not one of them. The code is opening a form (.OpenForm) you now need to open a report: http://google.com/
 
Hi Plog...

Thanks, at the begining I mentioned I am learning it, just started... No problem ... as Google is always helping and we are always learning.... willl learn this as well....

But anyway - for your kind response, once again many thanks.....
 

Users who are viewing this thread

Back
Top Bottom