Re: Popup Form to Delete Record
- From: "Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx>
- Date: Fri, 2 Dec 2005 09:01:05 +0800
The other form does not have focus, but you can still delete the record from
the RecordsetClone of the form.
This kind of thing:
Dim rs As DAO.Recordset
With Forms("NameOfYourOtherFormHere")
If .Dirty Then
.Undo
End If
If Not .NewRecord Then
Set rs = .RecordsetClone
rs.Bookmark = .Bookmark
.Delete
End If
End With
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"D Collins" <DCollins@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CBB026A2-7381-404E-A2FD-F06CB4EB83C6@xxxxxxxxxxxxxxxx
> Hello,
>
> I've done all that. What I was looking for is to delete the record on the
> form behind the unbound form. If I write code to delete, it thinks I want
> to
> delete a recond on the unbound form and not the form from which I opened
> the
> unbound form.
>
> Thanks,
> D.
>
> "Allen Browne" wrote:
>
>> You can create a small, unbound form.
>>
>> Put a text box on the form, and set its Input Mask property to:
>> Password
>>
>> Provide Ok and Cancel buttons on this form.
>>
>> In the Click event procedure of your Ok button, check the password is
>> correct.
>>
>> --
>> Allen Browne - Microsoft MVP. Perth, Western Australia.
>> Tips for Access users - http://allenbrowne.com/tips.html
>> Reply to group, rather than allenbrowne at mvps dot org.
>>
>> "D Collins" <DCollins@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:180EDB01-37FB-4BCD-A607-C14851ACCBBF@xxxxxxxxxxxxxxxx
>> > Hello,
>> >
>> > I have a form that has a command button that opens a custom popup
>> > password
>> > form. I wish to have the user enter in a password that will allow them
>> > to
>> > delete the record on the form below when the type in the correct
>> > password.
>> >
>> > Thanks,
>> > D.
>>
>>
>>
.
- Follow-Ups:
- Re: Popup Form to Delete Record
- From: D Collins
- Re: Popup Form to Delete Record
- References:
- Re: Popup Form to Delete Record
- From: Allen Browne
- Re: Popup Form to Delete Record
- Prev by Date: Re: Update a table using a form
- Next by Date: Re: Entering many new records at once
- Previous by thread: Re: Popup Form to Delete Record
- Next by thread: Re: Popup Form to Delete Record
- Index(es):