well u said that when your form opens, you only want to display companies where active is yes..
you will see all the companies that are active..
where else would you want to see the other records??
in the row source of your combo, i think you will have to put something like
SELECT tablename.CompanyID, tablename.Company, tablename.Active WHERE tablename.Active=True
ok basically i have 2 identically coded forms.. im sure of it,
both the Booking_Pickup_Customer and the [/b]Booking_Destination_Customer[/b] forms auto assign an unknown customer to the pickup/destination as the default record. Of course it should ONLY do this IF its a new record.
The...
ok i screwed up one part of it now.. noooo
ok basically the first form loads with the 2 dif combos auto creating a record..
you click pickup, and the pickup form loads fine. you enter a pickup, click next.. if you save it goes to the cust form.
the default customer unknown is already in the...
ok but this table structure has to be this way for now, because a pickup can also have multiple customers and then each customer for that pickup may have their own flight number and so on.
ok by removing that code which does the same thing.. i can now open the form with the filter and also auto...
ok, let me explain..
my main form is here
http://bb.1asphost.com/antonyx6/main.jpg
this form at the moment auto populates the Booker details with the customer 'unknown' details, which is what i want. i also want the account combo (just below the booker) to autopopulate the field with the first...
once these two features are taken care of i promise i wont need any more help on this issue..
i just need a form to be able to open and auto-populate more then one field with combos
and i need my previous (transfer id from form to form) form feaure to work with the above feature.
also im trying to allow this feature, along with a previous form feature that auto transfers an ID number.. this below code shows the first values in the combo but doesnt create a new record and doesnt transfer the id from the previous form
Option Compare Database
Option Explicit
Private Sub...
ok it works, the bookf auto populates the field..
im tryin to apply this rule to another combo aswell with this code, but the accountchoose doesnt do it
Private Sub Form_Current()
If (Me.NewRecord) Then
Me.bookf = Me!bookf.ItemData(0)
Me.accountchoose = Me!accountchoose.ItemData(0)
End...
so are you sayin that i should have one form for entry that uses the above code in the forms 'oncurrent' event and automatically adds a record..
and i should make a separate form for review that does not automatically add a record when it opens?
ok, well my forms are all data entry forms based on tables..
I agree, i do not need the suggestion, i simply need that default value to be stored in that field..
so how could i make my form..on open.. create a record and auto populate the chosen field with the first value in the respective...
so by pasting this code
If Me.bookf & "" = "" Then
Me.bookf = Me!bookf.ItemData(0)
End If
into the oncurrent event of my form (and as long as my combo 'bookf' is assigned to a field and is in text format) then as soon as the form opens... a new record will be created and the first value in...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.