subform not working

Bilal

Registered User.
Local time
Today, 21:36
Joined
Sep 30, 2013
Messages
64
Basicaly ive been working on my database for quite sometime and ive had a problem with the whole form/subform relationship, i have tried my best to get it to work, but if i try fix one thing another two errors creep up from behind, it is really really annoying and ive fried my brain googling.
Can someone please sort it out, the link below is not my actual database so i would like to know which errors i have made purely because you learn more from your blunders than you do from your triumphs.

The supplier form has a main form and a sub form.
when i flick through my records in main form, the data in the subform should automatically fill out by retrieving the corresponding data from the persons table aka tblPerson
tblPerson is linked (not working atm) with the subform and the main form is linked with tblSupplier

there are also a number of bugs in my form such as; where if i flick through my records the SupplierID stays the same (1) it shouldn't be like this as each supplier has a different autonumber assigned to it.
my main main main problem is getting the main form linked with subform
someone anyone help!
 

Attachments

Let's take it a few items at a time. In order for the SupplierName, Organization and State controls on the main form (frmSupplier) to show their respective values from the tblSupplier to which the form is bound, they will need to be bound to those fields with the control source of the controls.

In order for the Form/Subform to function as you want, you will need to complete the LinkMaster/ChildFields properties on the SubFormControl.
 
they will need to be bound to those fields with the control source of the controls.
the three fields that dont have a control source are working fine, however the supplierID field has a control source, it isnt working as intended, if i take the control source off it still doesnt work

In order for the Form/Subform to function as you want, you will need to complete the LinkMaster/ChildFields properties on the SubFormControl.

ive tried doing this many times, many people have told me however the same error message comes up when i click on the three dots on the right of both property sheet options, the error says 'cant build a link between unbound forms'

check my database in the last post you will see that it doesnt work as intended
 
Is there a reason you are trying to do this with unbound forms?
 
this is the mdb format of my database, if anyone could check and help sort out my suppliers form
 

Attachments

i thought that is the only way i am going to get this job done...what other ways are there?
Sorry about the slow response but we've been having trouble with my AWF account. I'll respond to this after I've had another look at your db.
 
Take a look at the attached db (frmSupplierBob). Not sure if this helps or if it is what you want.
this is very very similar to what i want, however yours is bound, i want to keep mine unbound and carry on, sort of as a academic exercise what would i have to do to get a similar end result. i remember a few posts ago on this exact same thread i was basically saying i didnt know what a bound form is and how its different from an unbound form because i said something like 'im doing in unbound because i didnt know any other way of doing it' but now a few days on i understand teh difference and now i want to learnt the hard way of doing it so i will be more comprehensive when doing the easy way, quite like learning html in notepad then finding it a ton easier when you are making a website in expression web. :) :)
 
Sorry about the slow response but we've been having trouble with my AWF account. I'll respond to this after I've had another look at your db.
No Problem mate, il put my latest version in mdb format, because ive made a lot of changes since, and ive learned a lot, got a few problems such as;

1.cancel button not working, need the form to go back into normal mode or previous state IF nothing was entered in the fields, if the fields have been filled out then a message should come up whether i want to keep records or delete.

2.delete button is messing about, im going to try to work this one out myself though

3. if i make a new record, i have to put the supplierID in manually, and it has to be correct, so if my last record was supplierID 42, i cant put 44 or 41, it has to be the exact right number which could confuse the end user. i want it to have the supplierID and also personID predefined, ready, so the end user shouldnt have to mess around with them two numbers, i think this is my biggest problem so far.

4. i need to know what code to put into the VBA to get the main form to link with the subform so it automatically displays data in subform according to the supplier being shown in the main form.

number 3 and 4 are the most important and i would be extremely grateful if you could help me solve even one of them . Thanks a bunch
Bilal :)
 

Attachments

Users who are viewing this thread

Back
Top Bottom