Ask a Question related to Microsoft Access, Design and Development.
-
Sean #1
Create a record upon opening form
Is there a way to create a new record in a table via query, code, property,
etc. without directly populating a field with data?
For example:
tblSomething
----------------------
SomethingID PK (autonumber)
SomethingDate
SomethingElse
tblOther
------------------------
OtherID PK
SomethingID FK
OtherStuff
OtherData
Now, lets say that SomethingDate and SomethingElse are derived in some
fashion, or better yet, just dependent upon OtherStuff and OtherData. I
want to create a record in tblSomething "behind-the-scenes" without the
users input or knowledge really.
Everything I try doesn't work because no record exists in tblSomething. And
that is just what I want -- to create the record!
I hope I have explained my question well enough.
Thanks for the help
Sean
Sean Guest
-
Change form record to match another form
I had a form with a lot of controls/subforms and this was causing my database to move slow. I decided to split the controls on two forms. Each... -
Auto create record in subform
In the calculation that gets the balances try using the Nz function. Nz(variant) You don't mention how you get the balances. (a VBA function is... -
Create simple form to add a record
I'm a new Access user. I have a table and want to create a simple form that will allow me to add records to the table. I have all the appropriate... -
look up record using ste values from one form on another form
it did not work here is the code i am using with the code you sent the command below operates off of a command button to find the record i want i... -
create record (in subform) automatically
Hi all I'm beginning to think in the wrong way, so I need help. In an Access 2000 database I have two (very) related tables, Invoices and Amount... -
Greg Doudna #2
Re: Create a record upon opening form
Sean:
In the Form Load event, DoCMD.OpenQuery "appendqueryname"
When the form loads, it runs the append query that creates/inserts a record
into the desired table. The query selects all the needed information from
its sources.
I assume you are opening this form from another? You probably are going to
need to pass parameters to your append query based upon information in the
main form.
If you mean create a blank record in a table, I'd have to ask why?
"Sean" <smartin70@hotmail.com> wrote in message
news:OUHF0qxRDHA.1576@TK2MSFTNGP12.phx.gbl...property,> Is there a way to create a new record in a table via query, code,And> etc. without directly populating a field with data?
>
> For example:
>
> tblSomething
> ----------------------
> SomethingID PK (autonumber)
> SomethingDate
> SomethingElse
>
> tblOther
> ------------------------
> OtherID PK
> SomethingID FK
> OtherStuff
> OtherData
>
> Now, lets say that SomethingDate and SomethingElse are derived in some
> fashion, or better yet, just dependent upon OtherStuff and OtherData. I
> want to create a record in tblSomething "behind-the-scenes" without the
> users input or knowledge really.
>
> Everything I try doesn't work because no record exists in tblSomething.> that is just what I want -- to create the record!
>
> I hope I have explained my question well enough.
>
> Thanks for the help
> Sean
>
>
>
Greg Doudna Guest
-
Sean #3
Re: Create a record upon opening form
Thank you Keith and Greg, I will give this append query and SQL a try.
Hopefully, one or both will work.
The reason I need to create a "blank" record (and maybe you can offer a
different solution) is because I have a strange 1 to many situation where
the "many" is produced first and the "one" is determined by characteristics
of the "many". What I exactly have is a bunch of boxes that are to be
shipped out. They need to have a shipment number, date, etc. BUT, I do not
want the user to enter this information. In order to be user
"mistake-limiting", (and believe me it needs to be) I want a simple button
that says "SHIP" -- and BAM! it creates the shipment number, date, etc.
I've tried a very simple situation where I took a "many" table with some
data and tried to concatenate two fields to create data to be filled in the
"one" table. No such luck.
Thanks again, I'll give your suggestions a try and see what I can do.
Sean
"Sean" <smartin70@hotmail.com> wrote in message
news:OUHF0qxRDHA.1576@TK2MSFTNGP12.phx.gbl...property,> Is there a way to create a new record in a table via query, code,And> etc. without directly populating a field with data?
>
> For example:
>
> tblSomething
> ----------------------
> SomethingID PK (autonumber)
> SomethingDate
> SomethingElse
>
> tblOther
> ------------------------
> OtherID PK
> SomethingID FK
> OtherStuff
> OtherData
>
> Now, lets say that SomethingDate and SomethingElse are derived in some
> fashion, or better yet, just dependent upon OtherStuff and OtherData. I
> want to create a record in tblSomething "behind-the-scenes" without the
> users input or knowledge really.
>
> Everything I try doesn't work because no record exists in tblSomething.> that is just what I want -- to create the record!
>
> I hope I have explained my question well enough.
>
> Thanks for the help
> Sean
>
>
Sean Guest



Reply With Quote

