Next Button

vid

Registered User.
Local time
Today, 08:57
Joined
Feb 4, 2010
Messages
62
Hi all!

Basically I have a form based on a query. The form has a Subform. The problem is that when i click on the next button in my form instead of going to the next page of the form, it stays on the same page but points to the next record.

what i need is that when i click on the next button, it should go to the record with the next Warranty ID instead of the next entry in the query ( which has the same Warranty ID but different details).

I hope you're able to understand the problem. :)

Please help! I'm clueless.. i can understand why this is happening nut i have no idea how to fix it!!!!





Update customer QueryWarranty IDClaim StatusCustomerRequestorQtyProduct CodeReason CodeRemarksLVP00086update customercust2sales200007 865 26

LVP00086update customercust2sales200007 011 11

LVP00086update customercust2sales200008 011 22

LVP00086update customercust2sales200008 018 01

LVP00090update customer

00002-1-1428.

LVP00090update customer

00007 865 26



This is the query. So basically in the form when i click the next button once it'll only point to the secord here. only after 4 clicks will it go to next page ie the next warranty ID!

PLEASE HELP
 
I think you need something like an attachment (word, zip).
 

Attachments

Hi, I don't think you understood my problem properly. I'm attaching a screen shot of the query as well as the form. Hopefully it'll be easier to understand now.

Basically what i need it that when i click on the next button on the main form, the next page of the form (ie the record with the next warranty ID) should open. Right now it simply goes to the next row in the query, which may or may not have the same warranty ID!

I can attach my database if you feel it'll be easier to understand the problem with that.

Please Help!!!! I'm still clueless :(
 

Attachments

Do a compact and repair on your DB, zip it up and post it. This will make it a whole lot easier to determine what is happening and how to fix it.
 
There.. Hope its easier to understand now. You need to open the form : Pending - Update Customers. Try clicking on the next button 4-5 times. You will understand the problem :)
 

Attachments

The Zip file seems to be corrupted. I've tried extracting the DB on two computers and neither will extract it Zip file :mad:
 
That's better :)

Give me a moment to have a play with it and work out what's going on.
 
A couple of quick observations first up.
  1. Consider implementing a naming protocol for your DB objects and controls. Something along the lines of TBL_TableName, FRM_FormName etc.
  2. Avoid using spaces and other special characters. Stick with alpha numeric and underscore (_).
  3. Get ride of Table level lookups. Follow the link for the reasons why.

I'm at a lose to know why you have used an SQL statement rather than your Table Warranty Claim (there's an example of why a naming protocol is handy). This is why the next button is not working properly and it is because the SQL statement is selecting the child records as well as the master records, so when you hit the next button it goes to the next child record rather than the next master record. Put your form in Data sheet mode to verify and you will see what I mean.

I've created a new form to show how things should work, it's not pretty but you should see what I mean.
 

Attachments

Umm.. that's the thing, I understand why the problem is happening. But i can't use the warranty claim directly. I need to use the query based on the value of the claim status.

I have 3 other forms like the pending - update customer. Each of them has records only such that all of them have a particular value of the claim status! So basically I need to use the query. Dunno what to do!
 
In that case you will need to re-work your query to only select the master records (ie. only the parts that you wish to show in the main form) that fit the criteria.
 
I tried that already :( still doesn't work!!
 
aaaarrrghhh!

Well now, when i only keep the fields in my main form inside my query, they become uneditable! i need to be able to edit them too... any suggestions????

I think the problem is that in my query I had to use SELECT DISTINCT because of which it becomes uneditable.. please help!!
 
Instead of using a query you could use your table and then put a filter on the data set to only show the data you need.
 
i couldn't figure out which form you were having issues with. however, your "edit claims" form seems to be doing what you need. why not use that?

if you need something a little different, copy/paste the form and adjust as necessary.
 
yeah! i know Edit Claims is working well..

the problem is with the Pending - Update Customer, Pending - Awaiting Defective goods, Pending - Delivery of Replacement forms.

yeah i think i'll try using a filter! hopefully it should work :)
 
yeah! i know Edit Claims is working well..

the problem is with the Pending - Update Customer, Pending - Awaiting Defective goods, Pending - Delivery of Replacement forms.

yeah i think i'll try using a filter! hopefully it should work :)

if you have a form where the main focus is the "Customer", then by all logic, the main data to draw from would be the "Customers" table (edit: just like you use the claims tables for the claims form! see?). You would then add more tables to your record source depending on what extra info you need OR you add a subform if you require 'child' records. If you want a CUSTOMER based form, then using the WARRANTY tables/queries will NOT allow your form to behave intuitively for customers (edit: even if you apply filters!). you just have to apply logic to the design and you'll be fine.

And as some very valuable advice (drawn from personal experience/frustrations) you should name your corresponding primary and foreign keys identically.
For example, in your customers table, you should have the primary key as autonumber (which automatically generates a number when you create a new record) and call it "CustomerID".

Then, in tables where you need to store customer details (e.g., your "Warranty Claims" table), you call the customer field "CustomerID" (not "Cust Ref" or anything else) and have it as Number data type (it can't be autonumber b/c it's not generating the number, it's just referring back to an existing number).

Remove the "lookup" from the tables, and instead, put the dropdowns in your forms as combo boxes. Removing the lookups will simplify the interaction between access/tables/yourself, while combos in the forms will give a user-friendly interface.

That alone will solve many, many current and future problems in logistical/strategic design and implementation. this i know from painful experience!
 

Users who are viewing this thread

Back
Top Bottom