Doub about ADP imlementation

  • Thread starter Thread starter Mestre
  • Start date Start date
M

Mestre

Hi,



I choose to develop a small internal application with Adp file because I
believe it was the fastest way to build it, but I don't work with access for
a long time.



My first doubt is about the navigation bar, in all the forms that I build,
the delete button in the navigation bar started with the status enable, but
after a few seconds changes to disable. I already look in properties of
form, options in project, in help but I couldn't found anything to change
this behaviour.



Thanks,

Mestre
 
If the Allow Deletions property for the form set to true?

It is also possible that some permission setting on the SQL-Server forbid
you of deleting records. You should take a look at the permission settings
for your account on the SQL-Server.
 
Hi Sylvian,



Yes I have the Allow Deletions set to true in the properties of the form.



I don't believe that the problem is related with any type of permission on
SQL Server or the connection to the SQL Server, because, I'm using
integrated security and my is user is the owner of the DB and is with system
administrator Role. Another reason that I don't believe it, is because if
were problems with the permissions in SQL Server I couldn't delete trough
code and if I have the form in runtime and go to Edit menu I can and choose
the option Delete Record it will delete the record.



I'm really lost with this, I don't know what to do.



Thanks

Mestre
 
Oh, I'm sorry, it's my error.

The red button with the X that you see in the navigation bar is not the
Delete Button, it's the Stop Reading button for long queries. It's used to
stop reading data for long queries and has nothing to do with deleting
records. This is why it's going to the disable state after a few seconds,
because all the available datas have been read.
 
No,



Sorry my ignorance, but I didn't see any reference to the button, and it
doesn't have a tool tip.



I have another two questions? Maybe you can answer to them to. If I can
explain me better.



First question, I want to delete records with a single click or a single key
in sub forms, to use the Del button I must have the property of Record
Selectors to be hable to delete the record with the Del button.



Second one, it's related with text fields, I use nchar in most of text
fields in DB, but when we are seeing the records, when the field got the
focus, let's supposed that I have a field nchar (50) but in one record I
have the value "ACCES" on it, we can see that the focus get "ACCES
" to all the size of the field (50).

I don't have any problem with that, but my users are used to press F2 to
edit one record, and when they press it, the cursor stays at the end of the
field. It looks that the access fills in with spaces the full size of the
field. I know if I go to Query analyzer and use the Len function in the
field I get a Len of 5 to that record.

But, like I was saying they press F2, with the cursor keys they move to the
beend of the word and they try to correct the word adding the char "S". What
happens, nothing, because we didn't delete any of the blank spaces. What I
try to say is that I have to delete blank space to add one or more chars.

It's a strange behaviour, I sure that must have other property to handle
with that.



Thanks in advance,

Mestre
 
For your delete problem, the best way might be to code your own delete
button. This is what I do usually.

For your nchar(50) problem, you must use nvarchar(50) instead of nchar(50)
but it is possible that you may have to edit already existing data. You
should have no problem with new data in the future.
 
Back
Top