UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
3 Pages V < 1 2 3  (Go to first unread post)
   Reply to this topicStart new topic
> New Record Icon In Datasheet View, Access 2013    
 
   
Doug Galayda
post Dec 4 2017, 08:11 PM
Post#41



Posts: 239
Joined: 19-May 10
From: Springfield, Illinois


Sorry about not being complete on the last post, please see attached image.png
dbo.Add_Info does have a primary key defined but you are right!
Look at the dbo.Waiver_Log LogID, it is not defined as a primary key.
I will have to check the production database, this is the SQL server test database.
But it is showing one of the tables to one of my subforms that is problematic does not have a primary key.
(I will might want to connect a front end to the test database before change it to a primary key)
but i don't think that would harm much functionality)
(I have been testing with the production database so far, because I can reverse out the updates easy)

Dbo.tblPermits---supplies main host form

Dob.tblAdd_Info—suppplies Additional Information subform

Dob.tblWaiver_Log —suppplies Edit Waiver subform

**With local tables, both subform's new record icon are working.

**Left off: I just had to check the production tables before I left at 730pm and both subordinate tables
that supply the sub forms have a good primary key.

Thanks again for your advice, much appreciated.
This post has been edited by Doug Galayda: Dec 4 2017, 08:36 PM
Attached File(s)
Attached File  ProblematicApp.PNG ( 114.46K )Number of downloads: 1
Attached File  Both_sub_have_pk_in_prod.PNG ( 97.31K )Number of downloads: 0
 
Go to the top of the page
 
Doug Steele
post Dec 4 2017, 09:44 PM
Post#42


UtterAccess VIP
Posts: 21,490
Joined: 8-January 07
From: St. Catharines, ON (Canada)


As Minty mentioned the other day, when you create a linked table that doesn't have a PK, you're prompted to provide one.

Try deleting the linked tables and relinking.

--------------------
Go to the top of the page
 
Doug Galayda
post Dec 5 2017, 08:55 AM
Post#43



Posts: 239
Joined: 19-May 10
From: Springfield, Illinois


Will do, thanks.
Go to the top of the page
 
Doug Galayda
post Dec 5 2017, 10:33 AM
Post#44



Posts: 239
Joined: 19-May 10
From: Springfield, Illinois


Deleted and re-linked the 3 tables,

--That did not work to make the new record Icon work,

Good Idea though.

(The relink took 3 minutes, I corrupted something and had to use a backup to recover before that)

Sorry about the wait, Thanks.

what to try next?
NEXT step, I am going to use a copy and comment out all the update, delete and insert VBA code
then make a simple plain query to supply the subform based on the log number id.
(Pass field on screen to the query criteria line as a parameter)

This post has been edited by Doug Galayda: Dec 5 2017, 10:59 AM
Go to the top of the page
 
Doug Steele
post Dec 5 2017, 10:54 AM
Post#45


UtterAccess VIP
Posts: 21,490
Joined: 8-January 07
From: St. Catharines, ON (Canada)


Okay, just to recap:
  1. The tables in SQL Server have primary keys
  2. If you go into SQL Server, you can update the tables
  3. When you create the linked tables in Access, you're not prompted to specify primary keys
  4. You cannot update the linked tables in Access
  5. The New Record does not show up in the form in Access


If you open the linked tables in Access in Design view, do you see the Primary Key key icon for each of the tables?


--------------------
Go to the top of the page
 
Doug Galayda
post Dec 5 2017, 11:01 AM
Post#46



Posts: 239
Joined: 19-May 10
From: Springfield, Illinois


1) All 3 tables have good primary keys in SQL server

2) Yes: I updated a record I each of the subforms tables in SQL server
Then did a save, the brought that same record up I the apps subform
And the “Check update” was there.
(One was in comment column, another in notes column)
--So I can update the subform’s tables in SQL server manually
and it shows in the subform screen when that log number is queried.

3) No, I am not prompted to create primary keys.

4) No, I can update the linked table's data in the existing reords in the subform,
then save and it will be in the SQL table.

5) The new record icon is not active, does not show up.
but it did place cursor in a new record when I tried with local tables.
This post has been edited by Doug Galayda: Dec 5 2017, 12:00 PM
Attached File(s)
Attached File  NEW_BLANK_RECORD_ICON.PNG ( 12.59K )Number of downloads: 0
 
Go to the top of the page
 
Doug Galayda
post Dec 5 2017, 12:46 PM
Post#47



Posts: 239
Joined: 19-May 10
From: Springfield, Illinois


1) Also tried to turn on Data tab property/Data Entry = Yes
(I see where you can this with VBA)
--did not not turn the icon on.
this caused me to hit the button twice to get the records to populate in the subform
on additional info subform.

2) And thinking about trying to put
DoCmd.GoToRecord , , acNewRec
Into the on load trigger to force the subform to open to a new record
This post has been edited by Doug Galayda: Dec 5 2017, 12:54 PM
Go to the top of the page
 
Doug Steele
post Dec 5 2017, 03:35 PM
Post#48


UtterAccess VIP
Posts: 21,490
Joined: 8-January 07
From: St. Catharines, ON (Canada)


There's really no point in futzing around with the Data Entry property. What it does is make the form usable for data entry only: you will not see any existing records in the table.

Do you have the same problem when you're using the local tables rather than the SQL tables? If so, then perhaps there is a point in uploading the database if you can.

--------------------
Go to the top of the page
 
Doug Galayda
post Dec 5 2017, 04:49 PM
Post#49



Posts: 239
Joined: 19-May 10
From: Springfield, Illinois


1) Your right, on the data entry,
--will strip it down and upload it asap.

2) No, when I am using local tables , it works great, like it should.

**there is 110 tables and views in this form,

**I have the AddInfo subform based on a regular query now
pointed at a parent form log id number field
I have a parameter screen pop up right now,
I am working on the fixing the query to use the parent log id field better.

**also I have a prior system I was looking at in which the add record Icon does activate
but only when it populates with records.
But this new one will have to be able to add the first new record.
I have been comparing the two subforms trying to find how they are different.
but now will strip it down and upload it asap.

Thanks!
This post has been edited by Doug Galayda: Dec 5 2017, 05:33 PM
Go to the top of the page
 
Doug Galayda
post Dec 6 2017, 04:01 PM
Post#50



Posts: 239
Joined: 19-May 10
From: Springfield, Illinois


UA,

I am on 11.th trimmed down version, it is hard to get the zip file down below 2.8MG to upload it,
it must be at or below 2MB
--I will keeping trimming

Thanks for your help, I really appreciate it!
This post has been edited by Doug Galayda: Dec 6 2017, 04:38 PM
Go to the top of the page
 
3 Pages V < 1 2 3


Custom Search
RSSSearch   Top   Lo-Fi    11th December 2017 - 11:27 PM