Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linked Forms Not working after SQL import

Status
Not open for further replies.

bradleyhorn

Technical User
Sep 15, 2004
35
0
0
US
Hi All,

I am having some trouble with a linked form. This form(2) is opened from another form(1) which lends it the parameter called "casenum". The second tabular form should open up and show all the records with the related "casenum". Now when the form(2) opens up all the data fields are grey. They don't even look like fields, they are just blank. The linked form(2) is basd on a query, that should choose the right "casenum":
SELECT zMoreServiceToParents.CASENUM, zMoreServiceToParents.DateService, zMoreServiceToParents.TypeOfService, zMoreServiceToParents.ServiceGivenToWhom
FROM zMoreServiceToParents
WHERE (((zMoreServiceToParents.CASENUM)=[Forms]![inpChildrensProjectServiceTargets]![CASENUM]));

This form was fine when it was on an ACCESS database but quit working when that table was brought into SQL-Server. Any Ideas?

Bradley
 
Do you have any boolen fields in the table. If so check to see that in SQL the default is set to something anything, just don't leave it blank. I know it sounds funny but if you exported the tables (data and sturcture) to SQL then the data types are not always exported correctly and in particular boolen fields in Access are not moved correctly and then lots of strange things happen. So the bottom line check the default value in SQL do not leave it blank.

Good luck
 
The answer is yes, there are Boolean fields. I will set the defaults, give it another try and report back.

Thanks,
Bradley
 
All the Boolean fields have a default, yet the form refuses to return any data fields. It returns only labels.

Let me ask this. The way I return the related records in this form containing child records is to base the child form on a query. This query reads the "casenum" field from the parent form and returns only those records to the child form. Pretty standard for ACCESS but does this "scheme" work when brought into SQL server?
 
Maybe there is a differnce between the SQL Server SQL and ACCESS SQL?
 
I do it a little different in that I store the ID (in your case the casenum) in to a global variable in Access. The default recordsource then looks to a function that returns the ID as a filter on either the record set or query that populates the form. Forgive my asking the obvious, you have checked that there are records that meet the criteria.



 
ssecca,

No actually there are not records that meet the criteria. But then again because the form is a medium to insert data into this data table, shouldn't it return active fields that I can enter data into, existing data or not? This is the problem. The form looks fine (has labels) but returns no active entry fields. Where the fields should be, and where they were earlier in ACCESS it is the same color as the backgraound of the form.

Bradley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top