report problems - not updating records

swift

Registered User.
Local time
Today, 15:47
Joined
Mar 12, 2006
Messages
67
Hello all,

(Probably) a simple one, one which I've had problems with before but have subsequently forgot how to rectify!!
On my form, I need to pick a record ID from a combo box then use anyone of a number of command buttons to enter results for different tests.
Problem arises when I view the report, it does not update the record I have selected at the combo box - it simply shows record number one.

Can anyone offer any help?!

Happy New Year!

Swift
 
Have you tried setting a WhereCondition to your RecordID in the OpenReport command?
 
Sorry Rural Guy, thats just way over my head!!

I hope its not too cheeky, but i have attached a stripped down copy of the DB if anyone wants to have a peek and give some advice.
To recap, the combo box on the form is used to select a record. Then a command button is used to enter results for that record id. At the moment the form only has one command button, but will have up to 20 or so when complete.
Its in Access07 BTW.
Thanks in advance.

swifty
 

Attachments

Sorry but all I have at present is AccessXP.
 
What code is behind your CommandButton? What is the SQL for the RowSource of the ComboBox and to what is the BoundColumn set?
 
Hi RG

The only code for the command button is an embedded macro 'onclick' - to open the form.
SQL for the row source of the combo box is
SELECT [ETC MAIN TABLE].[ID] FROM [ETC MAIN TABLE];
where ID is the record number; bound column is set to 1, which is ID in ETC MAIN TABLE.

I'm gonna keep looking for ways to resolve this, its driving me mad!!

cheers

swifty
 
Hi Swifty,
Can you convert the db to ac2k or ac2k2? Then I could look at it. Do you have a Macro defined for onclick? It almost certainly uses the OpenReport command. What you need can easily be accomplished with code. What is the name of your report and what is the name of the ComboBox?
 
OK, that attachment should be in Access2000.

This is the basic flow of things as they stand:
Register a sample with unique ID [ID] in sample register.
These samples then have tests carried out, which each need reported individually.
Then:
switchboard>enter test results>then use the locator [combo5] to select an [ID]>then click on open tfv form and then enter the result for the test carried out on that specific sample>then click to preview report [TFV REPORT]

Problem is that report for [ID] 1 always appears. Admittedly I only have 2 dummy records in the main table at the moment but I didnt think that would matter.

I hope thats clear - I've tried to lay that out above as I see it!!

Each test has a different name - the one in the DB attached is called TFV (its the simplest test so it was a good place to start), like I mentioned before, there will be more commandbuttons in time, I just wanted to get the basics sorted first!!
If you could help me further I would be eternally grateful - I've tried looking at the items you suggested earlier and I'm starting to understand a bit more....


swifty
 

Attachments

Sorry, but I've got to go program some registers right now. It will take several hours. I'll get back here as soon as I can.
 
hey no problem - i appreciate any help/advice you can give me, thanks!:)

swifty
 
Open the code behind the Command14 button on the ENTER TEST RESULTS FORM. Change:
stLinkCriteria = "[ID]=" & Me![ID]
to:
stLinkCriteria = "[ID]=" & Me!Combo5
...and see how it works.
 
Sorry i dont seem to be getting any further with that, I appreciate the help though!
:o

swifty
 

Users who are viewing this thread

Back
Top Bottom